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

209
Vistas
How to add the eventRender dynamically in fullcalendar after addEvents using Symfony

Here is a snip of my code. Plain user-calender.js file. On Ajax call I am initiating fullCalendar

let calendarElement;
window.ZC_Calendar = {
  calendarElement: undefined,
  init: function () {
    this.calendarElement = new FullCalendar.Calendar(
      document.getElementById('userCalender'),
      {
        timezone: 'local',
        customButtons: {
            occupied: {
            text: 'Occupied',
            },
            onLeave: {
            text: 'On leave',
            },
            available: {
            text: 'Available',
            },
        },
        headerToolbar: {
            right: 'prev,next dayGridMonth,timeGridWeek,timeGridDay',
            center: 'title',
            left: 'available occupied onLeave',
        },
        firstDay: 1,
        allDaySlot: true,
        navLinks: true,
        dayMaxEvents: true,
        displayEventEnd: true,
        displayEventTime: true,
      }
    );
    this.calendarElement.render();
  },
};

Now initiating the calendar on some action:

.on('change', '#teamMembers', function (e) {
   if ($(this).val() > 0) {
       ZC_Calendar.init();
      self.userAvailabilityCalender(this);
   }
})

Here is final ajax call, which fetch the data from and load on calendar. Here after the addEvent I want to show the tooltip of description portion

userAvailabilityCalender: function (input) {
        ZC_Calendar.calendarElement.removeAllEvents();
        $.ajax({
            url: Routing.generate('get_user_calender', {userId: $(input).val()}),
            type: 'GET',
            success: function (response) {
                for (let i = 0; i < response['events'].length; i++) {
                    ZC_Calendar.calendarElement.addEvent(response['events'][i]);
                }
            }
        });
    },

Final output of calendar: enter image description here

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