Skip to content

fix: calendar disabled hover closes: #4253 #4257

Merged
saadeghi merged 1 commit into
saadeghi:masterfrom
sulimanbenhalim:fix-calendar-disabled-hover
Nov 6, 2025
Merged

fix: calendar disabled hover closes: #4253 #4257
saadeghi merged 1 commit into
saadeghi:masterfrom
sulimanbenhalim:fix-calendar-disabled-hover

Conversation

@sulimanbenhalim

Copy link
Copy Markdown
Contributor

Problem

Fixes #4253

Disabled calendar dates in react-day-picker show hover background color, making them appear interactive when they cannot be clicked which creates confusing UX

Fix

Added CSS rule to remove hover background from disabled date buttons (:disabled:hover and [aria-disabled="true"]:hover) and set cursor to not-allowed

Testing

Tested in playground at disabled dates no longer show hover background color

@pdanpdan

pdanpdan commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Please, please, fix the content of the PR

@sulimanbenhalim sulimanbenhalim force-pushed the fix-calendar-disabled-hover branch from 8b8482b to b8dc45e Compare November 6, 2025 22:27
@sulimanbenhalim

Copy link
Copy Markdown
Contributor Author

Please, please, fix the content of the PR

@pdanpdan Give me a minute to fix things before spamming comments

@saadeghi

saadeghi commented Nov 6, 2025

Copy link
Copy Markdown
Owner

Have some tea ☕️☕️🫖 @sulimanbenhalim @pdanpdan

@saadeghi saadeghi merged commit 0a9cd05 into saadeghi:master Nov 6, 2025
@pdanpdan

pdanpdan commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

I would bo with :not([disabled]) on the rule above. The days are buttons with disabled set or not.
So the cursor is natively set, and now it is a double rule to set and unset the background

@saadeghi

saadeghi commented Nov 6, 2025

Copy link
Copy Markdown
Owner

@pdanpdan Yes that would be cleaner, but I think it would require adding not in all other states such as rdp-selected, rdp-range_start, rdp-range_middle etc (I didn't test yet)

@sulimanbenhalim sulimanbenhalim deleted the fix-calendar-disabled-hover branch November 6, 2025 23:21
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.

bug: Calendar disabled dates show hover effect

3 participants