開発中のプロジェクトにFullcalendarを使用しています ... 実装する機能が 1 つだけ残っています。それは、既存のイベントを元の位置から別の時間または日付にドラッグする場合です。現在のオブジェクト情報 (タイトル、新しい開始時刻、古い開始時刻、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();
}
},
しかし、それは私が望んでいたことをしていません...