Skip to content

[V9] [HOW-TO] Need help with range_start background using tailwind. #2308

Answered by gpbl
berkerdemirer asked this question in Support
Discussion options

You must be logged in to vote

@berkerdemirer If I understand correctly, you want to reproduce the style of a selected range, but using Tailwind. I believe the difficulty is to find the right Tailwind classes - not a problem in DayPicker itself.

The selected class doesn't do much in DayPicker - it just add a border to the selected button, so you can ignore it.

For the range, I applied two backgrounds:

  • one applied to the td.rdp-range_start elements,
  • one for button.rdp-day_button elements when children of such tds.

.rdp-range_start {
background: var(--rdp-range_start-background);
}
.rdp-range_start .rdp-day_button {
backgrou…

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@gpbl
Comment options

gpbl Jul 25, 2024
Maintainer

@berkerdemirer
Comment options

@berkerdemirer
Comment options

@gpbl
Comment options

gpbl Jul 25, 2024
Maintainer

@berkerdemirer
Comment options

Comment options

You must be logged in to vote
2 replies
@berkerdemirer
Comment options

@gpbl
Comment options

gpbl Jul 27, 2024
Maintainer

Answer selected by berkerdemirer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants