Patternslib / Patterns

Library for quickly applying rich interaction patterns without the need to write any JavaScript.
http://patternslib.com
Other
104 stars 43 forks source link

pat-validation: Validate a date input which was changed to text. #1182

Open thet opened 1 year ago

thet commented 1 year ago

There are cases where a <input type="date"> is changed to <input type="text"> by pat-date-picker: 1) If a browser does not support the date type (should be rare these days), 2) If we want to prevent the native date picker but use the JS one (e.g. for i18n where the browser language is different from the websites's UI language, where we need to support options not available with the native date picker, ...)

The date validation should then still be active. For that we need some changes in pat-validation. E.g. pat-validation validating text inputs with a pat-date-picker class.