Timeline plugin: date selector - #241
Conversation
Replaces the date selector placeholder with the real control: the current date rendered in the active time mode's format, opening a popover picker whose fields match that mode — a year stepper, a month grid, a day calendar, or a datetime field. Picks are validated and clamped to the timeline range, and out-of-range months and days are disabled. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgqjkZhQvfoBgdJtt9SSKS
MMGIS core stores and formats time as UTC ISO strings, so the selector now matches: all 32 date call sites across DateSelector and DayCalendar run through moment.utc. Previously the header rendered the viewer's local calendar day and a day click emitted an instant offset by the local UTC offset, landing on a different UTC day east and west of Greenwich. - Derive the HOUR-mode date from the selectedDate prop instead of a value seeded once on open, so a time change arriving while the picker is open is no longer overwritten with a stale date. - Rewrite the month field's text only when an arrow or a snapped year moves the view, not on every viewMonth change, so typing a two-digit month reaches October through December instead of being replaced mid-keystroke. - Give the picker popover a title element and aria-labelledby in place of a label pointing at an id that only exists in YEAR and MONTH modes, and set aria-haspopup/aria-expanded/aria-controls on the trigger. - Move focus into the popover on open and restore it to the trigger on close. - Name each day cell with its full date rather than the bare day number. - Split :focus-visible out of the calendar hover rule, which was both invisible and overriding the selected cell's fill, and keep the ringless reset for pointer focus only.
|
Review pass over the stack (#239–#243). Seven issues in this PR, pushed as The big one: local time vs UTCMMGIS core is UTC end to end — Two consequences, with
All 32 date call sites across Also fixed here
One thing left alone: the "Compare date" button still has no |
Replaces the date selector placeholder with the real control: the current date in the active time mode's format, opening a popover picker whose fields match that mode — year stepper, month grid, day calendar, or datetime field. Picks are validated and clamped to the timeline range; out-of-range months and days are disabled.
Stack — merge in order, starting from the base:
development