Skip to content

fix: render selected days with selected modifier when disabled#2700

Merged
gpbl merged 2 commits into
gpbl:mainfrom
rodgobbi:fix/issue-2699
Mar 8, 2025
Merged

fix: render selected days with selected modifier when disabled#2700
gpbl merged 2 commits into
gpbl:mainfrom
rodgobbi:fix/issue-2699

Conversation

@rodgobbi

@rodgobbi rodgobbi commented Mar 8, 2025

Copy link
Copy Markdown
Collaborator

Fixes issue #2699 by always applying the selected modifier if a day is part of the selected date.

Notes:
This fix reverts this change from a previous fix PR.
What I understood from the context is that the main issue the referred PR fixes is that the disabled days were able to be clicked and selected, so displaying them as selected seems correct while ignoring click events coming from them.

Demo:

Tested rendering duplicated DayPickers by rendering them disabled.

Screenshot 2025-03-08 at 11 11 49

Added new example for testing the modifier customizations are applied:

Screenshot 2025-03-08 at 11 25 45

@rodgobbi rodgobbi requested a review from gpbl March 8, 2025 10:33

@gpbl gpbl left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s great! I have no idea why we accepted that previous behavior. 🤷

@gpbl gpbl merged commit d7d0a8a into gpbl:main Mar 8, 2025
@gpbl gpbl linked an issue Mar 8, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style days as selected also when they are disabled

2 participants