EventDrop in full screen jquery

In the evendrop of the fullcalendar plugin, I want the event to be dragged, but if I write the following piece of code, it will give me the event of the position where it will be dropped, but not the position from which it was dragged.

eventDrop: function( event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view )
{
    console.log(event)
}

      

For example, suppose an event happened at 9am on March 22nd, and I drag it to say 9am on March 23rd. So if I write the above snippet, I get the March 23rd event, but I'm not sure how I would get the March 22nd event.

Please help me here.
Thank.

+3


source to share


1 answer


From the specification :

an event is an event object that contains information about the event ( date , title, etc.).

dayDelta contains the number of days that the event was moved forward (a positive number) or backward (negative number).

minuteDelta contains the number of minutes that the event was moved forward (a positive number) or backward (negative number). Useful for the agenda only. In other views, 0 is passed.



you have all the information you need to get the date of the event before dragging

eg. the event date is now Jul 26, 2012 14:00:00 dayDelta = 1 and minuteDelta = -60, then the original event date was Jul 25, 2010 15:00:00

+1


source







All Articles