Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

438
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda