Is there any way to add different background color in React big calendar for entire date cell only when there is any event displayed on cell?

Viewed 390

Currently I am trying to use this below:

const ColoredDateCellWrapper = ({ children, value }) =>
  React.cloneElement(Children.only(children), {
    style: {
      ...children.style,
      backgroundColor: value < CURRENT_DATE ? "lightgreen" : "lightblue",
    },
  })

but it won't work for me as I need to add different backgroundColor for the cells having events array.

1 Answers

Yes in eventStyleGetter you can return the class name and provide the background color to the cell where events are there.

Related