sfirke opened a new issue, #45901:
URL: https://github.com/apache/superset/issues/45901
# IN PROGRESS - WIP
## [SIP] Proposal for adding a calendar picker to base Superset (revisited)
### Motivation
This SIP revisits SIP-116, which over several years did not coalesce into a
single vision and which is not currently receiving input from the people who
initially shaped it. SIP-116v2 seeks to provide a clear option to vote on so
this work can advance.
From SIP-116: "Current time period filter is overly complicated and
counterintuitive for users to work with."
### Proposed Change
Make three incremental changes to the native dashboard time range filter:
Step 1: we keep the same set of default Time range filter choices
("Current", "Advanced", "Custom" etc.) on the dashboard editor view but the
dashboard owner gets a checkbox control to show users "Calendar" inputs for
changing those values via a friendly calendar date picker.
- Unchecked is today's behavior, unchanged. Existing filters (no setting
saved) stay on Full.
- Calendar checked: the filter bar shows only the inline date-range picker.
No Range type dropdown, just a start calendar and end calendar as if you were
booking a round-trip flight. Picking dates gives a fixed range with the end
date included.
- The owner still sets the default value with the full control, so a default
like "Last week" still loads the dashboard with that filter, displaying its
actual dates. Then how those display to the end user depends on whether they've
picked Full or Calendar.
- Edge case: if the default includes a time of day (e.g. "10 days before
now" currently uses the current time), the calendar shouldn't imply whole days
that aren't actually included. Rounding to include the entire day, and/or a
small text hint, both seem reasonable to me. Maybe the small text hint, to
preserve the current behavior? I am not sure if the text hint would be for the
dashboard editor setting the filter - then they can use a different filter
option to get complete dates - and/or for the end user.
Instead of showing the active date range to the user as an inequality like
`2026-11-01 ≤ col < 2026-12-01` as we do now, it would look simpler,
`2026-11-01 – 2026-11-30` - the universal convention with calendar pickers
across websites is that they're full-day inclusive.
Newly-created chart behavior would be governed by a config flag,
`time_range_filter_simple_calendar_by_default`. The default value would be
`False`, the current behavior, but some orgs would set it to `True`.
This is built as a shared component that can be reused. Then Step 2 below is
a small follow-up to bring this to Explore (chart design).
Step 2: we reuse this friendly date picker as a new Time range filter
choice. It becomes a sibling of "Current", "Advanced", etc. That way it can
used in Explore (chart design) too.
Step 3: refactor the time range filter component to be easily extensible by
Extensions, so that companies can modify the filters to meet their unique needs
(e.g., fiscal years) by adding more range types (or hiding the ones they don't
want).
Here are some screenshots from @CodeWithPravinMaske who has done a lot of
work on a PR and graciously held it for the SIP process to run its course.
These depict Steps 1 & 2 both completed:
<img width="1780" height="1580" alt="Image"
src="https://github.com/user-attachments/assets/2bc138f7-c53e-4dc6-be45-b69e5cbe2dae"
/>
<img width="1734" height="1556" alt="Image"
src="https://github.com/user-attachments/assets/32790ce0-6392-434d-96c9-8397cabe98d9"
/>
### New or Changed Public Interfaces
In Step 3, this would rewrite the time range filter to be an internally-used
extension. Ville suggested on the October 2026 Townhall meeting that we make it
an extension but one that is bundled with base Superset.
### New dependencies
None.
### Migration Plan and Compatibility
None.
### Rejected Alternatives
Describe alternative approaches that were considered and rejected.
--
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]