Skip to content

fix(calendar): show the selected date in forced colors mode - #4835

Merged
saadeghi merged 1 commit into
saadeghi:v5.8from
sulimanbenhalim:fix-calendar-selected-forced-colors
Oct 31, 2026
Merged

saadeghi merged 1 commit into
saadeghi:v5.8from
sulimanbenhalim:fix-calendar-selected-forced-colors

Conversation

@sulimanbenhalim

Copy link
Copy Markdown
Contributor

the selected date is only a background and text color swap, so in forced colors it looks like every other day, in cally, react-day-picker and vanilla-calendar-pro. react-day-picker is the worst one: every day button has a transparent 2px border that forced colors draws, and the selected day has border: none, so it's the only day without a box. used the system Highlight and HighlightText colors for the selected date (ranges too) in forced colors.

the play has react-day-picker's real markup. cally and vanilla-calendar-pro need their scripts, so i checked those two locally in chrome.

to see it: devtools rendering, emulate forced-colors: active
https://play.tailwindcss.com/krPBHEanIc

forced-colors: active

@github-actions

Copy link
Copy Markdown

1 component changed. Basic playground: Before vs. After.

@saadeghi
saadeghi merged commit d751192 into saadeghi:v5.8 Oct 31, 2026
1 of 2 checks passed
@sulimanbenhalim
sulimanbenhalim deleted the fix-calendar-selected-forced-colors branch October 31, 2026 11:16
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.

2 participants