Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 8, 2025

Conversation

rodgobbi
Copy link
Collaborator

@rodgobbi rodgobbi commented Mar 8, 2025

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
Copy link
Owner

@gpbl gpbl left a comment

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
11 checks passed
@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