ui icon indicating copy to clipboard operation
ui copied to clipboard

Add max="9999-12-31" to all date inputs to fix invalid year input

Open adrianaditech opened this issue 9 months ago • 5 comments

The current date inputs in the application allow entering invalid year. image

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.

adrianaditech avatar May 05 '24 19:05 adrianaditech

@Civolilah is it possible to set max on date input?

turbo124 avatar May 06 '24 00:05 turbo124

You just set <input type=“date” max=“9999-12-31”… and the browser automatically recognizes that and only allows 4 digit year entry

adrianaditech avatar May 06 '24 00:05 adrianaditech

@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?

Civolilah avatar May 06 '24 07:05 Civolilah

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 avatar May 06 '24 23:05 turbo124

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.

Civolilah avatar May 07 '24 09:05 Civolilah