[DateTimePicker] Add step support to date picker

RESOLVED FIXED in Firefox 56

Status

()

enhancement
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: scottwu, Assigned: scottwu)

Tracking

(Blocks 1 bug)

unspecified
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.