Javascript – jQueryUI FullCalendar: Callback after events have been fetched from server

fullcalendarjavascriptjquery-ui

I use the jQueryUI FullCalendar from Adam Shaw (http://arshaw.com/fullcalendar/docs/event_data/events_function/).

When I press the next button the calendar loads new events from my server and I would like to show these events also as a table on my page, not only in the calendar. Is there a callback function that I can inject to do something with the events, once FullCalendar has fetched them? Or is there any other way to get the currently shown events?

Best Answer

For others seeking out this solution, it's pretty easy in V2. You can pass a success callback using the simple events object.

        $('#calendar').fullCalendar({
            events: {
                url: 'http://yourdatafeed',
                type: 'POST',
                error: function() {
                    // Alert on error
                },
                success: function (data) {
                    // data will have your json array of event objects
                },
            }
        });
Related Topic