Skip to content

DatePicker: Limit years in dropdown to valid years #1710

@MagnusNordboe

Description

@MagnusNordboe

Description

When using a DatePicker component with a limited maxDate like today or tomorrow, the year-picker dropdown still displays future, invalid years. Thus, on a component where you can only select dates in the past, the user must still scroll through a bunch of irrelevant years before any valid years become visible in the UI.

Image

Additional Information

Image

Tasks

No response

Acceptance Criterias

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    org/brgIssues relevant for Brønnøysundregistrene.squad/utformingIssues that belongs to the named squad.
    No fields configured for Enhancement.

    Projects

    Status
    Done
    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions