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

346
Visualizações
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

over 4 years ago · Santiago Trujillo
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