Closed
Bug 1320647
Opened 9 years ago
Closed 8 years ago
[DateTimePicker] Add min/max support to date picker
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: scottwu, Assigned: scottwu)
References
(Blocks 1 open bug)
Details
(Whiteboard: [milestone6])
Attachments
(1 file, 3 obsolete files)
No description provided.
Updated•9 years ago
|
Whiteboard: [milestone6]
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•9 years ago
|
||
WIP update
- Improved styling for month-year button
- Added new svg for arrows
- Added min/max support
- Working on step support
Updated•9 years ago
|
Blocks: datetime-bugs
Updated•9 years ago
|
No longer blocks: datetime-bugs
Updated•9 years ago
|
Priority: -- → P3
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•9 years ago
|
||
WIP update
- Rebased to central
- Implemented step for days on calendar
- Will work on step support for months and years
Assignee | ||
Updated•9 years ago
|
Attachment #8815153 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Updated•9 years ago
|
Component: XUL Widgets → Layout: Form Controls
Product: Toolkit → Core
Version: unspecified → 53 Branch
Assignee | ||
Comment 9•8 years ago
|
||
Due to changes in spec, I'm breaking this bug up to smaller ones. This one will be for min/max specifically.
Summary: [DateTimePicker] Add min/max and step support to date picker → [DateTimePicker] Add min/max support to date picker
Assignee | ||
Updated•8 years ago
|
Attachment #8815153 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8822009 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8822010 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8822011 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8815153 -
Flags: review?(mconley)
Assignee | ||
Comment 11•8 years ago
|
||
This patch implements support for the min and max attributes on <input type="date"/>. Dates outside of the min and max range are greyed-out and do not respond to clicks or hover.
Also, the DateKeeper now uses a date object (instead of 3 separate attributes: year, month, day) to track of the date it is displaying.
Mike, I wonder if you have time to review this bug? (and a few more to come)
Thanks in advance!
Flags: needinfo?(mconley)
Comment 12•8 years ago
|
||
(In reply to Scott Wu [:scottwu] from comment #11)
> Mike, I wonder if you have time to review this bug? (and a few more to come)
> Thanks in advance!
I think I'll be able to review this in the short term, yes. In future, btw, no need to needinfo? as well as r? me - the r? is sufficient on its own. :)
Flags: needinfo?(mconley)
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8815153 [details]
Bug 1320647 - Implement min and max for date picker.
https://reviewboard.mozilla.org/r/96180/#review140254
Sorry for the delay - this looks good to me. Thanks!
::: toolkit/content/widgets/datekeeper.js:19
(Diff revision 4)
> + MIN_DATE = -8640000000000000,
> + MAX_DATE = 8640000000000000;
I suspect you're deriving this from http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1, right? If so, can you please mention that?
::: toolkit/content/widgets/datekeeper.js:75
(Diff revision 4)
> * {Number} month [optional]
> * {Number} date [optional]
> * }
> */
> - set({ year = this.state.year, month = this.state.month, day = this.state.day }) {
> - this._update(year, month, day);
> + set({ year = this.year, month = this.month, day = this.day }) {
> + // Use setUTCFullYear so that year 99 doesn't get parsed as 1999
Maybe we should mention this in the function header, that we're not taking the short-form for years?
Attachment #8815153 -
Flags: review?(mconley) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8815153 [details]
Bug 1320647 - Implement min and max for date picker.
https://reviewboard.mozilla.org/r/96180/#review140254
No worries. Thanks a lot Mike!
> I suspect you're deriving this from http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1, right? If so, can you please mention that?
Yeah I'll add a comment for that.
> Maybe we should mention this in the function header, that we're not taking the short-form for years?
Ok!
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 17•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ece97e873769
Implement min and max for date picker. r=mconley
Keywords: checkin-needed
Comment 18•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•