Vigneshwar Vicky
Vigneshwar Vicky

Reputation: 36

How can I Customise reach big calendar

How do I change the background cell color for a particular date in react big calendar. is there any custom way of doing it?

Upvotes: 1

Views: 1973

Answers (1)

sawim
sawim

Reputation: 1082

You can set eventPropGetter function, which takes event from cell and returns object with proper style, for example:

<Calendar
    eventPropGetter={event => ({
        style: {
            backgroundColor: event.start.getDay() < 5
                ? "#ad4ca4"
                : "#3174ad",
        }
    })}
/>

Upvotes: 3

Related Questions