| Summary: | date/time input min and max attribute are ignored | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Luke Warlow <lwarlow> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | akeerthi, cdumez, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | macOS 11 | ||
|
Description
Luke Warlow
2021-03-12 11:00:11 PST
Thanks for the report! I agree that keyboard arrows should better respect the min/max attributes. I also agree that the calendar UI should give an indication of the min/max dates. Note that the calendar is a standard system view, so the fix cannot be made in WebKit alone. I will look into what can be done here. However, I don't understand exactly what you mean by "submitted form data ignores the attributes entirely". I've linked a test case below where the attributes are validated upon submission. Attempting to submit a date outside the min/max range will present a validation message, and :invalid CSS rules are applied as expected. Test case: https://jsfiddle.net/8Ljh0npf/ I've just checked out your test case, and it does indeed work as expected. I must have got the form data without actually doing the form submission step when testing it, sorry for that mistake. After some more recent testing this is also the case on iOS, at least for the date input. Being able to select an invalid value is very unintuitive. |