DateTime segments allow entering values beyond the min/max limits #138
Labels
🐞 bug
Something isn't working
❗️ p1-high
Important tasks or features with significant impact on users or the project
What
Provided a date field with a
min
/max
props, the date segments are properly limited with arrow up/down key events, but when entering a value manually, the min/max are not respected.The tricky part here is we could only prevent date entry in certain scenario: When the month and year is known beforehand. This is possible if min/max have the same month AND year values. (i.e: When the user only has to enter 1 segment to complete the date).
If the min/max allows for more than one enterable segment, then this breaks down as the order of entry is not reliable and the possible values depends heavily on the most significant segment (month/year).
Alternatively we could emit a validation error when that happens, but that error won't be translatable which follows the HTML rules behavior in other components. Maybe this is a quick fix that is worthwhile.
This can be alleviated partially with #139
The text was updated successfully, but these errors were encountered: