laravel-fullcalendar icon indicating copy to clipboard operation
laravel-fullcalendar copied to clipboard

Refresh calendar with ajax

Open lgt opened this issue 8 years ago • 4 comments
trafficstars

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.

lgt avatar Oct 05 '17 12:10 lgt

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!

Byronsargeant avatar Mar 14 '18 21:03 Byronsargeant

or maybe a class can be set in the setOptions() and that could be targeted??

Byronsargeant avatar Mar 14 '18 21:03 Byronsargeant

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?

Helidalto avatar May 17 '18 20:05 Helidalto

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..

ShapesGraphicStudio avatar Sep 30 '19 11:09 ShapesGraphicStudio