Skip to content Skip to sidebar Skip to footer

Fullcalendar: How To Display Events In Fullcalendar Through Ajax Response

I am working in full calendar. Now I need to show up all the events from the database through the ajax call. Till now, I have taken the events from database through JSON. My JSON o

Solution 1:

Change your ajax code to that

$.ajax({
    url: "calendar/show_events",
    type: 'POST', // Send post data
    data: 'type=fetch_events',
    async: true,

    success: function(s){

          var dynamic_events = [];
            $(s).find('event').each(function() {
                dynamic_events.push({
                    title: $(this).attr('title'),
                    start: $(this).attr('start') // will be parsed
                });
            });
            callback(dynamic_events);

          }
});    

Post a Comment for "Fullcalendar: How To Display Events In Fullcalendar Through Ajax Response"