-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Currently the step
property in time picker only affects two things:
- options in the dropdown (or hides it if step is less than 15 min)
- the value resolution/precision (format of the
value
property; does it include milliseconds, seconds, minutes)
But it doesn't affect validity of the value (unlike step
in vaadin-number-field
). So if you e.g. set step
to 3600 (1 hour) the dropdown shows only exact hours, but you can still input for example "10:05" and it will stay in the input and the input will stay valid and value
property will get updated to "10:05".
The current behaviour is probably ok as a default and has use cases when you might want to show only some values in the dropdown but want to allow more precise manual input.
My suggestion is to add a new feature like validate-by-step
which would make the field become invalid if the given value does not match the step
(in cases when you only want to allow specific exact intervals of values to be given).