Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

210
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda