ui
ui copied to clipboard
Add max="9999-12-31" to all date inputs to fix invalid year input
The current date inputs in the application allow entering invalid year.
To fix this please set max="9999-12-31" attribute on all inputfields where type="date" then the user will be permitted to enter a valid date up to 9999-12-31 and cursor won't allow entry of 6 digit years.
@Civolilah is it possible to set max on date input?
You just set <input type=“date” max=“9999-12-31”…
and the browser automatically recognizes that and only allows 4 digit year entry
@Civolilah is it possible to set max on date input?
@turbo124 Yes, of course, we can set it to some realistic value. What do you think should be the maximum?
the suggest one here is fine 9999-12-31 as long as it does not impact the format that a user can add the date in, ie, localized date input format
the suggest one here is fine 9999-12-31 as long as it does not impact the format that a user can add the date in, ie, localized date input format
@turbo124 Okay, sure, it will be added as a maximum date.