Skip to content Skip to sidebar Skip to footer

Updating An Event By Dragging/dropping Fullcalendar- Javascript

I'm using Fullcalendar for a project I'm developing ... I have only one feature left to be implemented, which is when an existing event is dragged from it's original position to an

Solution 1:

Take a look at the Event Dragging and Resizing http://arshaw.com/fullcalendar/docs/event_ui/

I think what you are looking for the eventDrop callback.

Triggered when dragging stops and the event has moved to a different day/time.

http://arshaw.com/fullcalendar/docs/event_ui/eventDrop/

Example from arshaw's site:

$('#calendar').fullCalendar({
    events: [
        // events here
    ],
    editable: true,
    eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) {

        alert(
            event.title + " was moved " +
            dayDelta + " days and " +
            minuteDelta + " minutes."
        );

        if (allDay) {
            alert("Event is now all-day");
        }else{
            alert("Event has a time-of-day");
        }

        if (!confirm("Are you sure about this change?")) {
            revertFunc();
        }

    }
});

Post a Comment for "Updating An Event By Dragging/dropping Fullcalendar- Javascript"