laravel-fullcalendar
laravel-fullcalendar copied to clipboard
Refresh calendar with ajax
Thanks for this cool calendar!
Because I deal with a lot data how would be possible to refreasg the calendar with new data on day, wee, month change?
I would like to initiate the calendar with laravel but to be able on events to refresh the calendar via ajax.
Looking for solution to this too!
.fullCalendar( ‘refresh’ ); .fullCalendar( ‘refetchEvents’ ); .fullCalendar( ‘rerenderEvents’ );
But the calendar ID is dynamically generated and is different each time the page loads it seems so will figure out a way to store the element using JS when its initially loaded and then call one of the above methods on the element as and when needed!
or maybe a class can be set in the setOptions() and that could be targeted??
I tried to do with .fullCalendar ('refresh'); .fullCalendar ('refetchEvents'); .fullCalendar ('rerenderEvents');
it works only with $ ('#' + $ (".fc"). attr ('id')) fullCalendar ('removeEvents');
how do I reload from a button click per example?
Hi @Helidalto , Sorry for recalling an old thread, but did you solve this ? I have recurring events and variables changing on the week number, so I need to refresh data on week change.
$(document).ready(function() {
$(".fc-next-button").click(function () {
$("#calendar-{{ $calendar->getId() }}").fullCalendar("removeEvents");
});
});
... works fine, but I can't manage to refresh..