Issue 819: Dragging an event a millisecond (give or take) after the calendar has been updated calls eventDragStart but never eventDragStop or eventDrop because the event never gets stuck to the mouse.
Status:  Duplicate
Merged:  issue 100
Owner: ----
Closed:  Feb 2011
Reported by gautamad...@gmail.com, Feb 6, 2011
I have a fullcalendar that's connected to a server through some ajax calls, and what I need is to not update the calendar when ajax calls return data if I'm currently manipulating stuff on the calender on the client side when the data comes in.

For example I move an event to a new location and while the ajax is working on that I start moving another event, if I haven't dropped that newer event when the ajax is done the calendar is not updated with that information until I drop the newer event and the ajax for that finishes.

This makes the editing of the calendar a much better experience, because without it I could be moving an event and then suddenly it disappears from my mouse because the event I just edited before it is done updating itself or in other words you don't have to wait for each event to update it self before you go on to edit another.

Now I tried doing this by creating a currEditing variable that starts at 0 and if I start dragging an event it goes to 1 and when I drop it it goes to 0, if currEditing is not 0 when the ajax finishes it doesn't update the calendar but leaves it to the function at the end of the next ajax call.

    eventDragStart: function() {
        currEditing = currEditing+1;
        console.log("+: "+currEditing);
    },
    eventDragStop: function() {
        currEditing = currEditing-1;
        console.log("-: "+currEditing);
    },

This works, except in one case because of a bug possibly, if I start dragging an event a millisecond after the calendar has been updated, eventDragStart is called but the event doesn't actually get dragged and therefor is never dropped and therefor currEditing stays at 1 and doesn't go to 0, which brakes the updating mechanism of the calendar.

So what I need is that it either gets dragged or that eventDragStart doesn't get called in those cases.

One thing that comes to mind that could fix this without actually fixing the bug is to disable editing of the calendar when it starts the process of updating it self and enable it again when it's done or a second after it's done, but I'm not sure if that feature is available.

The way I update the calendar after an ajax call is some code that eventually does:
    $('#calendar').fullCalendar('removeEvents', filter);
    $('#calendar').fullCalendar('addEventSource', data);

I tried doing the same thing using updateEvent instead of removeEvents+addEventSource but the problem is still presents.

Any ideas?
Feb 13, 2011
Project Member #1 adamrs...@gmail.com
i'm almost sure the best solution for this is  issue 100 . merging...

this is what google calendar does
Status: Duplicate
Mergedinto: 100