<input type=time> validation does not support reversed range
Categories
(Core :: DOM: Forms, defect, P3)
Tracking
()
People
(Reporter: TimothyGu, Assigned: jdai)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.42 Safari/537.36
Steps to reproduce:
<!DOCTYPE html>
<meta charset=utf-8>
<input type=time min="14:00:00" max="12:00:00" value="15:00:00" id=inputtime>
<script>
console.log(inputtime.validity.rangeOverflow, inputtime.validity.rangeUnderflow);
</script>
WPT available after https://github.com/web-platform-tests/wpt/pull/21103, which is tracked in bug 1608009.
Actual results:
"true false" is printed.
Expected results:
"false false" should be printed.
This is per https://html.spec.whatwg.org/C/#the-min-and-max-attributes, especially the constraint validation rules pertaining to when the element "has a reversed range".
Comment 1•5 years ago
|
||
Reproduced on latest FF versions on Windows 10 x64.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Google plans to fix their implementation and support reversed ranges soon. It would be good to proactively avoid a webcompat issue for developers and get the Firefox implementation up to spec without too much of a lag.
Assignee | ||
Comment 3•5 years ago
|
||
Put into my queue, I'll implement it. :)
Comment 4•5 years ago
|
||
FYI, I just submitted the implementation of this in chromium for version 82, and updated the MDN article for <input type=time> by adding a "Making min and max cross midnight" section: https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time$revision/1608939
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Since it's nearing the end of the Nightly 75 cycle, I'll hold off landing this feature until after the version bump to 76 on March 9th.
Comment 9•5 years ago
|
||
bugherder |
Comment 10•5 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Added to Firefox 76 for developers.
Comment 12•5 years ago
|
||
Also added information at:
- https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmin
- https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax
- https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Client-side_validation
The article https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time had already been updated when I got to it, though I found improvements to make and made them.
Description
•