Skip to content

fix(calendar): close year picker when tapping the already-selected year#6386

Open
Gdhanush-13 wants to merge 2 commits intoheroui-inc:v3from
Gdhanush-13:fix/calendar-year-picker-close-on-same-year
Open

fix(calendar): close year picker when tapping the already-selected year#6386
Gdhanush-13 wants to merge 2 commits intoheroui-inc:v3from
Gdhanush-13:fix/calendar-year-picker-close-on-same-year

Conversation

@Gdhanush-13
Copy link
Copy Markdown

What

Fixes #6329

Problem

When the year picker is open and the user taps the already-selected year, the picker stays open instead of closing.

Fix

Skip the redundant setFocusedDate call when the selected year already matches the focused year, and always call setIsYearPickerOpen(false). This ensures tapping the current year reliably closes the picker.

… Tabs

The secondary variant styles used descendant selectors (e.g.
.tabs--secondary .tabs__tab) which leaked into nested Tabs
components with a different variant, because inner elements are
still descendants of the outer .tabs--secondary.

Fixed by scoping all secondary variant selectors through the direct
child > .tabs__list-container, which correctly stops at the Tabs
component boundary. Nested Tabs have their own .tabs__list-container
that is NOT a direct child of the outer .tabs--secondary.

Closes heroui-inc#6381
When the year picker is open and the user taps the currently selected
year, the picker should close. Previously, calling setFocusedDate with
the same year value could interfere with the setIsYearPickerOpen(false)
call due to react-aria state processing.

Fixed by skipping the setFocusedDate call when the selected year matches
the focused year, and always calling setIsYearPickerOpen(false).

Closes heroui-inc#6329
@Gdhanush-13 Gdhanush-13 requested a review from jrgarciadev as a code owner April 1, 2026 12:01
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

@Gdhanush-13 is attempting to deploy a commit to the HeroUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant