在fullcalendar插件的evendrop中,我想要被拖动的事件,但是如果我编写下面的代码,它会给出它被拖动的位置的事件,而不是它原来的位置的事件拖拽。
eventDrop: function( event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view )
{
console.log(event)
}
例如,假设 3 月 22 日上午 9 点有一个事件,我将其拖到 3 月 23 日上午 9 点。因此,如果我写上面的文章,我会得到 3 月 23 日的事件,但我不确定如何得到 3 月 22 日的事件。
请帮帮我。
谢谢。
最佳答案
来自specification :
event is an Event Object that hold the event's information (date, title, etc).
dayDelta holds the number of days the event was moved forward (a positive number) or backwards (a negative number).
minuteDelta holds the number of minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed in.
您已拥有在拖动之前获取事件日期所需的所有信息
例如 事件日期现为 2012 年 7 月 26 日 14:00:00 dayDelta = 1 & 分钟Delta = -60 那么事件的原始日期为 2010 年 7 月 25 日 15:00:00
关于jquery - 完整日历 jquery 中的 eventDrop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9812227/