Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

periodically refresh events in fullcalendar

In the documentation of arshaw's full calendar, I found the method I think, I need to use: .fullCalendar( 'refetchEvents' ) but since I'm totally unfamiliar with JavaScript, I don't have a plan on how to use this function.

I'd like to know a simple way to make the calendar reload the events from the event sources and rerender them periodically (e.g. every 30 seconds).

Any hints will be highly appreciated.

like image 212
user1145874 Avatar asked Jan 11 '23 03:01

user1145874


1 Answers

Simply use setInterval function : http://www.w3schools.com/jsref/met_win_setinterval.asp

setInterval(function(){$('#yourCalendar').fullCalendar('refetchEvents')}, 30000);
like image 167
Jeremy Avatar answered Jan 21 '23 23:01

Jeremy