Closed
Bug 1364026
Opened 8 years ago
Closed 8 years ago
[DateTimePicker] Check if min and max attributes are valid date strings
Categories
(Core :: Layout: Form Controls, enhancement, P1)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: scottwu, Assigned: scottwu)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
According to the spec[1], the min and max should be valid date strings, and should be set to empty if they aren't.
Currently, the min and max values are used directly in Date constructor, which is very forgiving and can parse the dates that aren't valid date strings. This causes discrepancy between the input box and the picker.
[1] https://html.spec.whatwg.org/multipage/forms.html#date-state-(type=date)
Updated•8 years ago
|
Priority: -- → P1
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → scwwu
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•8 years ago
|
||
Rather than re-implementing the date validation method, I exposed the cpp method via webidl. Do you think this approach is okay :jessica?
Flags: needinfo?(jjong)
Comment 5•8 years ago
|
||
(In reply to Scott Wu [:scottwu] from comment #4)
> Rather than re-implementing the date validation method, I exposed the cpp
> method via webidl. Do you think this approach is okay :jessica?
I think it's okay as long as it's chrome only. You can just use "ChromeOnly", I don't think XBL code needs it right now.
And maybe "GetMinimum/Maximum" would be more useful?
Please remember that changing .webdil requires review from a DOM peer.
Flags: needinfo?(jjong)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•8 years ago
|
||
mozreview-review |
Comment on attachment 8885109 [details]
Bug 1364026 - (Part 2) Check if min and max attributes on input type date are valid date strings.
https://reviewboard.mozilla.org/r/155962/#review162604
Looks good, thanks!
Attachment #8885109 -
Flags: review?(mconley) → review+
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8885108 [details]
Bug 1364026 - (Part 1) Expose HTMLInputElement.getMinimum/getMaximum methods via webidl.
https://reviewboard.mozilla.org/r/155960/#review163096
Attachment #8885108 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 10•8 years ago
|
||
Thanks :mconley and :smaug! Checking it in.
Keywords: checkin-needed
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Scott Wu [:scottwu] from comment #12)
> Comment on attachment 8885109 [details]
> Bug 1364026 - (Part 2) Check if min and max attributes on input type date
> are valid date strings.
>
> Review request updated; see interdiff:
> https://reviewboard.mozilla.org/r/155962/diff/3-4/
Rebased to central and resolved conflicts.
Comment 14•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ee20903b5973
(Part 1) Expose HTMLInputElement.getMinimum/getMaximum methods via webidl. r=smaug
https://hg.mozilla.org/integration/autoland/rev/39f99fa53275
(Part 2) Check if min and max attributes on input type date are valid date strings. r=mconley
Keywords: checkin-needed
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ee20903b5973
https://hg.mozilla.org/mozilla-central/rev/39f99fa53275
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•