angular-material-components icon indicating copy to clipboard operation
angular-material-components copied to clipboard

HH and MM values gets corrected upon invalid input value but they shouldn't

Open KissBalazs opened this issue 3 years ago • 0 comments

Writing an invalid hour or minute in the input field results in a strange mechanism:

First, we type in an invalid hour value: image

Then, after loosing focus, the date gets corrected by modulo division. image

This can be quite bad, as when the user makes a typo it gets corrected to an unwanted time. (i.e: wants to write 22:10, but writes 32:10 instead. The form will auto-correct it to a bad value and they will save the form with 08:10 this way, which is quite bad instead of an error message)

My suggestion is to let the time picker stay in an invalid value instead of the best intention fix.

KissBalazs avatar Feb 23 '22 10:02 KissBalazs