-
Hey Team, I want to show events like in the image below. I want to work with dayFns to create reoccurring events Is there a way that I work with tileContent or tileClass and that I am able to return multiple classes if they object has more events? So that I return an object or array instead?
I want that my calender looks roughly like that or that I give different borders. But the problem is how should I check for different events? Or should I make the dates a object and put a css class in them to do this? any help is much appreciated, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Adding multiple class names through Similarly, for tileContent, you can return multiple elements the same way you can from a React component: using array or Fragment: |
Beta Was this translation helpful? Give feedback.
-
Thanks Wojtekmaj, that helped me heaps. If anyone is interested how I did it please check my repository and the live version: |
Beta Was this translation helpful? Give feedback.
Adding multiple class names through
tileClassName
is simple! You can either pass them as an array or merge the strings yourself:https://codesandbox.io/s/react-calendar-tileclassname-multiple-zc9s1p
Similarly, for tileContent, you can return multiple elements the same way you can from a React component: using array or Fragment:
https://codesandbox.io/s/react-calendar-tilecontent-multiple-b5bfg