我正在将Fullcalendar用于我正在开发的项目......我只剩下一个功能需要实现,即当现有事件从其原始位置拖到另一个时间或日期时。我想知道如何获取当前对象信息(标题、新开始时间、旧开始时间、id、url 等),因此我可以使用更新的信息更新数据库...... Fullcalendar 对象中的哪个属性我用?我实施了drop
财产;
drop : function(date, allDay) {
// retrieve the dropped element's stored event object
var originalEventObject = $(this).data('eventObject');
// we need to copy it, so that multiple events don't
// have a reference object
var copiedEventObject = $.extend({}, originalEventObject);
// assign it the date that was reported
copiedEventObject.start = date;
copiedEventObject.allDay = allDay;
// render the event on the calendar
// the last `true` argument determines if the event `sticks`
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
// if the 'remove after drop' checkbox checked?
if ($('#drop-remove').is(':checked')) {
// if so remove the element from the "Draggable Events"
$(this).remove();
}
},
但它没有做我想要的......