Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

433
Views
how to change the background color of specific days in react-big-calendar

I'm trying to change the backgroundColor of specific days.

Ideally I would like to change the background color for the days that contain events on them but in this particular case because I'm testing the library I'm just trying with the 16th day:

const dayPropGetter = useCallback(
  (date) => {
    return {
      ...(DateTime.local(date).day === 16 && { style: { backgroundColor: 'blue' }})
    }
  }
, [])

My code should make the background color of the 16th day on my calendar to be blue, it is almost the same as the example they put in the docs however nothing happens.

This is my calendar component:

<Calendar
  localizer={localizer}
  views={['month']}
  dayPropGetter={dayPropGetter}
  events={events}
  style={{height: 500}}
/>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!