Implement date picker sub-control
Categories
(Calendar :: Calendar Frontend, task)
Tracking
(Not tracked)
People
(Reporter: arschmitz, Unassigned)
References
(Depends on 2 open bugs, Blocks 2 open bugs)
Details
(Whiteboard: [calendar-ui-create-edit])
Summary:
Add a date picker to the Date and time row. Let the user select one date or
a date range in one dropdown with two small calendars. Selection changes the
draft, which holds unsaved values, not the saved event.
Links:
- Zeplin date picker annotation: https://app.zeplin.io/project/66dd0f2b2fe8f1b63cda36f1/screen/6a0f2f285393a283202254bc
- Interaction guide: Create > Time: https://docs.google.com/document/d/15OpMthOHmBGyPpDBNRW8vp6uCxeoitBp8n7Fti3LD10/edit?tab=t.why4m6lqup0#heading=h.kvtn68hx95tv
- Cally web component date picker: https://wicky.nillia.ms/cally/
- Planning: Datepicker - Event Date Picker Needs
- Planning: Questions - Date Picker Architecture
Open decision:
- Decide whether to build a Thunderbird picker or use an open-source component.
- The existing plan lists Cally as a candidate because it supports ranges,
multiple months, theming, and smaller web components. This is not a final choice.
Acceptance criteria:
- Open one dropdown from the date control. Show two small calendars.
- A single-date selection updates the start date. For a range, put the earlier
date in start and the later date in end. - Change only dates. Preserve time, timezone, All-day, recurrence, and all other
draft values. - If the dialog switches from event A to B, the old picker for A must not
change B's dates. - Opening the picker must not cause late growth of the positioned parent dialog.
Position the popup only after its trigger has rendered.
Required implementation details:
- Render current start/end dates through stable storeObserver selections.
Do not add getters that read the store directly. - Keep popup-open state, focus, and picker-specific state inside the picker,
outside Redux. - Send a typed date-only draft update. Use serializable values, not calIEvent,
calIDateTime, live calendars, input elements, or editor objects. - Bugs 2061232 and 2061236 supply initial dates. Do not load events or choose
defaults in the picker. - Check the current session, which identifies one create or edit operation,
before accepting a selection. - Bug 2061578 owns advanced range replacement, drag selection, and keyboard
range interactions. This story keeps their integration points available.
Minimum test coverage:
- Check opening, two-calendar display, single dates, and date ranges.
- Check earlier/start and later/end assignments and date-only updates.
- Check that non-date values remain unchanged and no live objects enter the draft.
- Switch from A to B and check that A's old picker cannot update B.
- Check popup focus and positioning without late parent-dialog growth.
- Run axe checks on the displayed picker where supported.
Out of scope:
- Initial values, time or timezone editing, and recurrence behavior.
- Advanced range and keyboard interactions in Bug 2061578.
- Saving, loading, or changing source events.
Comment 1•3 months ago
|
||
I would strongly suggest not going off into implementing something custom, when a standard <input> type exists.
| Reporter | ||
Comment 2•1 month ago
|
||
TB-Tools story description:
Summary:
Add a date picker to the Date and time row. Let the user select one date or
a date range in one dropdown with two small calendars. Selection changes the
draft, which holds unsaved values, not the saved event.
Links:
- Zeplin date picker annotation: https://app.zeplin.io/project/66dd0f2b2fe8f1b63cda36f1/screen/6a0f2f285393a283202254bc
- Interaction guide: Create > Time: https://docs.google.com/document/d/15OpMthOHmBGyPpDBNRW8vp6uCxeoitBp8n7Fti3LD10/edit?tab=t.why4m6lqup0#heading=h.kvtn68hx95tv
- Cally web component date picker: https://wicky.nillia.ms/cally/
- Planning: Datepicker - Event Date Picker Needs
- Planning: Questions - Date Picker Architecture
Open decision:
- Decide whether to build a Thunderbird picker or use an open-source component.
- Cally is a good candidate because it supports ranges,
multiple months, theming, and smaller web components. This is not a final choice.
Acceptance criteria:
- Open one dropdown from the date control. Show two small calendars.
- A single-date selection updates the start date. For a range, put the earlier
date in start and the later date in end. - Change only dates. Preserve time, timezone, All-day, recurrence, and all other
draft values. - If the dialog switches from event A to B, the old picker for A must not
change B's dates. - Opening the picker must not cause late growth of the positioned parent dialog.
Position the popup only after its trigger has rendered.
Required implementation details:
- Render current start/end dates through stable storeObserver selections.
Do not add getters that read the store directly. - Keep popup-open state, focus, and picker-specific state inside the picker,
outside Redux. - Send a typed date-only draft update. Use serializable values, not calIEvent,
calIDateTime, live calendars, input elements, or editor objects. - Bugs 2061232 and 2061236 supply initial dates. Do not load events or choose
defaults in the picker. - Check the current session, which identifies one create or edit operation,
before accepting a selection. - Bug 2061578 owns advanced range replacement, drag selection, and keyboard
range interactions. This story keeps their integration points available.
Minimum test coverage:
- Check opening, two-calendar display, single dates, and date ranges.
- Check earlier/start and later/end assignments and date-only updates.
- Check that non-date values remain unchanged and no live objects enter the draft.
- Switch from A to B and check that A's old picker cannot update B.
- Check popup focus and positioning without late parent-dialog growth.
- Run axe checks on the displayed picker where supported.
Out of scope:
- Initial values, time or timezone editing, and recurrence behavior.
- Advanced range and keyboard interactions in Bug 2061578.
- Saving, loading, or changing source events.
| Reporter | ||
Updated•1 month ago
|
Description
•