Native DatePicker: min and max HTML attribute shouldn't contain time #12007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Setting the
minDate()
/maxDate()
restrictions on a native Date input doesn't restrict the selection in the GUI. Currently, the min/max attribute on the HTML tag contains the time, even when one is just using theDatePicker
(notDateTimePicker
). According to the HTML docs, a date input should only have the date and ommit the time.Produces:
But should produce:
The native date time input works fine. But according to HTML standard, the space between the date and time should be an
T
. But Chrome also accepts the space. And the GUI only restricts the date selection, not the time selection. But I guess thats regular chrome behavior.The JS date and date time picker work fine as expected.
Visual changes
Before (tested with Chrome 123 on Mac/Safari 17.2.1 on Mac/Firefox 124 on Mac):
After:
Functional changes
composer cs
command.