Skip to content

How do I apply styling to certain tiles? #582

Answered by wojtekmaj
AbbosRakhmonov asked this question in Q&A
Discussion options

You must be logged in to vote

Use tileClassName for applying class names to certain tiles, and use this classname to change the color and/or apply other styles to said tiles.

Example: https://codesandbox.io/s/react-calendar-tileclassname-0nlmh

Similarly, you can use tileContent to add extra content to any tile.

Example: https://codesandbox.io/s/react-calendar-tilecontent-b5bfg

To trigger an action when you click on a specific day, you should use onDayClick.

Example: https://codesandbox.io/s/react-calendar-ondayclick-h74t3

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AbbosRakhmonov
Comment options

Answer selected by wojtekmaj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants