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

206
Vistas
fullcalendar make color for overlapping background events identical to non overlapping background events
events:[
  {overlap:false, display:'background', start:'2021-12-23 10:15:00', end:'2021-12-23 10:30:00'},
  {overlap:false, display:'background', start:'2021-12-23 10:30:00', end:'2021-12-23 10:45:00'},
  {overlap:false, display:'background', start:'2021-12-23 10:30:00', 
end:'2021-12-23 11:15:00'},
  {overlap:false, display:'background', start:'2021-12-23 12:00:00', end:'2021-12-23 12:45:00'},
  {overlap:false, display:'background', start:'2021-12-23 12:30:00', end:'2021-12-23 13:00:00'}
]

I am using Fullcalendar in view timeGridWeek and events that overlap show with a different color from events that don't overlap.

How can I have Fullcalendar use the same color for overlapping events as for non-overlapping events?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's not really a different color, it's just that the background event elements have transparency. In the physical world, when you superimpose two transparent things on top of each other, the result when you look through them is a darker color because the light has to go through two layers of filtering instead of one. That behavior is also implemented in the way CSS does transparency.

The only way I know of to guarantee complete consistency is to remove the transparency and use a solid color for the background events instead:

 .fc-bg-event { opacity: 0.5 !important; }

Demo: https://codepen.io/ADyson82/pen/xxXdpYX

However, I think this has some disadvantages:

  • you can't see the grid lines behind the event showing the time intervals

  • you can't really see where each event starts and ends, so it's hard to tell if there are separate events on the calendar that overlap or are back-to-back.

You'll need to decide if your desire for a consistent background color outweighs these drawbacks.

about 4 years ago · Juan Pablo Isaza Denunciar
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