Closed vleong2332 closed 7 years ago
tl;dr - Disable freetyping in polyfilled fields yourself, because the library cannot support it.
Right now there are no plans to support this, for a few good reasons:
If the user dirties the date field by typing manually, the library can no longer programmatically change its display value. This breaks the library.
Native implementations (Chrome, iOS Safari) do not work this way. Chrome has keyboard input, but it isn't free-typing.
When I designed the polyfill behavior, I considered forcefully preventing free-typing input, but deemed this too invasive. Maybe it will prevent such input in the future, if this is revealed to be a common problem. Either way, it's pretty easy to add your own keydown
handler that calls event.preventDefault()
.
In Firefox, if I type in the date manually instead of using the picker, the
<input>
value is not updated regardless of whether or not the typed-in date is in validyyyy-MM-dd
format.