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

385
Visualizações
how to add class in fullcalendar

i need to add class for specific booked and blocked days in fullcalendar, i need to highlight the booked and blocked days with different color. Try tried out with some code but not coming correctly

$("#calendar").fullCalendar({
    header: {
        left:   'title',
        center: '',
        right:  'prev,next'
    },
    selectable: true,
    events:[
        {
            title: 'Booked',
            start: '2017-03-11',
            end: '2017-03-22'
        },
        {
            title: 'Block',
            start: '2017-03-28',
            end: '2017-04-6'
        }
    ]
});
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Use eventRender function in your fullCalendar options:

eventRender: function(event, eventElement) {
    if (event.title == "Booked") {
      eventElement.css('background-color', 'green');
    }
  },

or add a class with jquery addClass

eventElement.addClass('yourClass');

you can also reference sub-elements if you need

eventRender: function(event, eventElement) {
    if (event.title == "Booked") {
      eventElement.find("a.fc-content").css('background-color', 'green');
    }
  },
about 4 years ago · Santiago Trujillo 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