0

big calendar react Can we have multiple color on different dates of Month?

Suppose: Every Date on month will have different color according to its events.

Aamir
  • 1
  • 2
  • Could you be more specific about your problem? – keikai Mar 05 '20 at 11:24
  • I have calendar control, i want to have different color on different dates. Like: 1 March Red Color to full Box 2 March Blue Color to Full Box 3 March Grey Color to Full Box – Aamir Mar 05 '20 at 11:31

1 Answers1

0

The dayPropGetter does allow you to set styling in the month view, according to date, but it does not have access to other calendar props (like events)

Method signature:

(date: Date) => { className?: string, style?: Object }

Usage:

const dayPropGetter = (date) => {
  // build some className from the `date` and/or
  // build some style definition from the `date` data
  return { className, style }
}

<Calendar dayPropGetter={dayPropGetter} />

So, if you wanted to highlight every Wednesday, or weekend days, or 'today' in some manner, you could use this to do that.

Steve -Cutter- Blades
  • 5,057
  • 2
  • 26
  • 40