Closed Bug 1363672 Opened 7 years ago Closed 7 years ago

[DateTimePicker] Add step support to date picker

Categories

(Core :: Layout: Form Controls, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: scottwu, Assigned: scottwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Support the step property for date picker. Dates should be disabled if they are off-step, as shown in the UX spec: https://mozilla.invisionapp.com/share/237UTNHS8#/screens/171579745
Implemented step for the calendar view. Step feature for month and year spinners has been de-scoped.

In this patch, the `getDays` function in `datekeeper.js` has been re-arranged, and "selection" state would not be applied if the date is either out-of-range or off-step.
Comment on attachment 8866709 [details]
Bug 1363672 - Add step support to date picker.

https://reviewboard.mozilla.org/r/138334/#review143182

This looks great! Thanks!
Attachment #8866709 - Flags: review?(mconley) → review+
Thanks Mike, I've since found a few issues with how min/max/value are handled in this patch, so I'll delay landing this patch for now.
Priority: -- → P1
Updated the patch to use `getStep` and `getStepBase` which are used by input fields to calculate steps. This simplifies things because the picker wouldn't need to do the same calculation when input field also did. Aside from that, nothing is changed. I think it's safe to check this in.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f7afd5fee9f2
Add step support to date picker. r=mconley
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f7afd5fee9f2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: