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

391
Vistas
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'
        }
    ]
});
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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');
    }
  },
over 4 years ago · Santiago Trujillo 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