jeudi 7 juillet 2016

RefetchEvents fullcalendar from single event source


Am working in fullcalandar jquery plugin,but now i stuck with refetching calendar. I have two event sources , and i have made custom refresh button on calendar headar. I want to do refetch events only from second event source whenever user hits refresh button.

Is there any way to pass paramater in fullcalendar refetchEvents and do refetch from single event source.

events: function(start, end, timezone,callback) {
            $.ajax({
                url:  //FIRST EVENT SOURCE
                dataType: 'json',

                success: function(response) {
                    //attaching the response to the calendar
          }

          $.ajax({
                url:  // SECOND EVENT SOURCE
                dataType: 'json',

                success: function(response) {
                    //attaching response to calendar
                 }
             });
       }

Whenever user clicks on custom Refresh button , am doing $("#calendar").fullcalendar('refetchEvents'); -- this will refetch whole calendar (first + second event source)

What i expect to do is , i want to do refetch only for second event source.


Aucun commentaire:

Enregistrer un commentaire