jqueryangularjsangularjs-directivefullcalendarjquery-callback

Fullcalendar refetch events callback


Currently using fullcalendar.io

In the documentation, it has calendar.fullCalendar('refetchEvents') that refetch all the events from the server.

In short, I want calendar.fullCalendar('refetchEvents') request to be completed and send me back a callback to let me know. I want all the events to be downloaded before i proceed with certain tasks.

How can i do that?


Solution

  • Solved it by doing refetch events after a successful http post as below

      Service.insert(event).
                success(function (data, status, headers, config) {
    
                    calendar.fullCalendar('refetchEvents');
    
                }).
                error(function(data, status, headers, config) {
                    alert('error');
                });