Open Bug 2061240 Opened 3 months ago Updated 1 month ago

Implement date picker sub-control

Categories

(Calendar :: Calendar Frontend, task)

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:

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.
Blocks: 2061578

I would strongly suggest not going off into implementing something custom, when a standard <input> type exists.

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:

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.
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.