Skip to content

Year picker init state inconsistency #5643

@Luftare

Description

@Luftare

Describe the bug
Given a DatePicker with props:

  • showYearPicker
  • selected={null}

Issues:
All years are highlighted when no selection is made. I'd expect none to be highlighted when no selection as when using showMonthYearPicker without init selection.

To Reproduce
https://stackblitz.com/edit/vitejs-vite-cyahbe6y?file=src%2FApp.tsx&terminal=dev

Expected behavior
No year is highlighted if selection is null.

Screenshots

This is a screenshot of 3 calendar instances in their init states with null selection. The year and month selections look different.

Image

Desktop (please complete the following information):

  • OS: macOS 15.4.1
  • Browser Chrome
  • Version 135.0.7049.115

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions