How do I apply styling to certain tiles? #582
-
I need some help I have to list important events that should take place on special days at the bottom of the calendar, according to the information in the backend. So how can I change the color of special days and when I click on that day some information should appear below. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Use Example: https://codesandbox.io/s/react-calendar-tileclassname-0nlmh Similarly, you can use Example: https://codesandbox.io/s/react-calendar-tilecontent-b5bfg To trigger an action when you click on a specific day, you should use Example: https://codesandbox.io/s/react-calendar-ondayclick-h74t3 |
Beta Was this translation helpful? Give feedback.
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