Skip to content Skip to sidebar Skip to footer

Fullcalendar.js: Event Callbacks Not Firing For Added Events That Get Resized/clicked/dropped?

After adding an event and then changing it again, nothing happens, // * no callback. I even used fullCalendar('refetchEvents') still no luck. Am I missing something? Here is the co

Solution 1:

Those callbacks are not properties of the events. They are top level fullcalendar options. Each section of the docs represents one FC top level option. Some options can also be specific to certain events, but they are mentioned as such in the docs. If you look at event object you see that there is no eventResize property, for example.

So the fix is to just move the callbacks to the top level:

$('#calendar').fullCalendar({
    /*...other options*/eventResizeStop: function (event, jsEvent, ui, view) {
        alert('end');
    },
    // * no callbackeventClick: function (calEvent, jsEvent, view) {
        alert('clicked');
    },
    // * no callbackeventDrop: function (event, delta, revertFunc, jsEvent, ui, view) {
        alert('dropped');
    },
    // * no callbackeventResize: function (event, delta, revertFunc, jsEvent, ui, view) {
        alert(event.title + ' end is now ' + event.end.format());
    },
    events: [{
        title: '',
    /*... etc*/

Here's a JSFiddle with it working.

Post a Comment for "Fullcalendar.js: Event Callbacks Not Firing For Added Events That Get Resized/clicked/dropped?"