mete-capar-kd opened a new issue, #45177: URL: https://github.com/apache/superset/issues/45177
## [SIP] Proposal for an editable calendar in shared time-range filters ### Motivation The shared time-range editor requires switching range types to access absolute date controls. Common workflows would benefit from seeing the range, editable endpoints, and recent windows together. Clicking the text should allow typing; opening the picker should be a separate action on the calendar icon. For example, selecting October 3 through October 7 should include both days, while entering October 3 at 12:10 through October 7 at 18:45 should preserve those exact timestamp bounds. ### Proposed Change Introduce an internal `BasicDatePicker` with date and date-time modes, plus a `BasicCalendar` range editor used by the existing shared `DateFilterLabel` in Explore and dashboard native filters. - Show two consecutive month panels with range highlighting and editable endpoints. - Accept strict day-first dates (`DD/MM/YYYY`) and date-times (`DD/MM/YYYY HH:mm`, with optional seconds), as well as ISO input. - Keep the input editable without opening a popup. The calendar icon or Arrow Down opens the picker; Escape closes it. Date-time popups provide separate hour and minute columns and an explicit Done action. - Preserve incomplete or impossible text and disable Apply until it is corrected; disable Apply while the changed draft is awaiting backend validation. - Keep quick presets relative, including recent minute/hour windows in date-time mode. - Retain existing relative, custom, and expression controls under Advanced options; unsupported saved expressions open those controls directly. - Use existing theme tokens, translation APIs, Day.js, and Superset UI component wrappers. Add keyboard navigation and constrain the popup height for shorter screens. The implementation uses the calendar as the default editor. Display-format localization and whether upstream adoption should be phased behind a feature flag are points for design review.   ### New or Changed Public Interfaces This changes the frontend interaction in the shared time-range control. It adds internal React components, with no REST endpoint, database model, CLI, or deployment configuration changes. Existing `time_range` strings remain the persistence and backend interface. ### New dependencies None. The implementation uses dependencies already present in Superset. ### Migration Plan and Compatibility No database migration or saved-dashboard/chart migration is required. Relative presets remain relative strings. Inclusive date-only selection is encoded using Superset's exclusive end bound (October 3–7 becomes `2026-10-03 : 2026-10-08`). Date-time selection keeps its exact exclusive end timestamp. Saved advanced expressions remain available through the existing editor. A companion implementation PR will be linked here for review and kept in draft while this proposal is discussed. ### Rejected Alternatives - Styling the existing popup alone would not provide an inline two-month range view or separate manual-entry and picker-opening interactions. - Adding a new date-picker dependency would duplicate utilities and theming already available in Superset. - Replacing the advanced expression editor would risk changing existing saved-range semantics; this proposal retains it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
