jquery Full Calendar: callback 'after' the calendar has loaded completely

Khizar picture Khizar · Feb 14, 2012 · Viewed 27.3k times · Source

Is there a callback in Adam Shaw's jquery full calendar which is called after the calendar has rendered completely?? I want to call the clientEvents function in that call back to get all the events on the client side. I tried doing this in viewDisplay, but it is called before the events are rendered and the clientEvents returns 0 events.

Answer

Chris picture Chris · Sep 15, 2012

I know this post is rather old now, but if it's any help, you don't need to modify the original source as suggested by Cheery (although his/her answer does work fine as well).

You can also just use the callback 'loading' which is already in place:

$('#calendar').fullCalendar({
   loading: function(bool) {
      if (bool){
         alert('I am populating the calendar with events');
      }
      else{
         alert('W00t, I have finished!');
         // bind to all your events here
      }
   }
);