Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

335
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!