Skip to content

[Parameters] Restrict date picker to only show/enable dates that exist in the data #23925

@jesshitchcock

Description

@jesshitchcock

Use case

When a date parameter uses a calendar picker (type: date), users can select any date - including dates where no data exists. This leads to empty or confusing results. Users need the calendar to only allow selection of dates that are actually present in the dataset, with unavailable dates greyed out or hidden.

Proposed solution

Allow a date parameter's calendar picker to be constrained by a dimension reference (similar to options_from_dimension), so that only dates with data are selectable. Unavailable dates should be visually disabled (greyed out) in the calendar UI.

Alternatives considered

  • options_from_dimension: replaces the calendar with a dropdown list of available dates from the data. This solves the "only valid dates" problem but removes the calendar UI, which is less intuitive for date selection.

Workaround

Use options_from_dimension pointing at the date dimension instead of type: date. This shows a dropdown of only the dates that exist in the data. Trade-off: loses the calendar picker UI.

Additional context

Related to the broader request for dynamic parameter defaults. Particularly relevant for snapshot-style datasets where only specific dates have data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions