miguelcobain / ember-paper

The Ember approach to Material Design.
http://miguelcobain.github.io/ember-paper
MIT License
889 stars 331 forks source link

Mark date inputs as valid when (partially) cleared #1154

Closed pauln closed 4 years ago

pauln commented 4 years ago

Chrome 83 has removed the clear button from date inputs, which means that there's now no way to clear a date field and have its validity state correctly updated. Since the oninput event fired when the first date component is cleared provides an empty string as the new value, we can detect this and override validity.badInput to immediately update our validity state in order to avoid leaving the field permanently flagged as invalid.

Fixes #1153