Is there a 'revert' function for FullCalendar
I have a calendar events that have custom properties one being isPublished which can be changed on the fly so I can't set the editable value to false. I am wondering how to cause an event to revert to its previous location on the calendar if it is marked isPublished.
开发者_运维问答eventDrop: function (event, jsEvent, ui, view){
//event.start = dateAdd(d,dayDelta,event.start);
if (event.isPublished == 0){
addEditEvent(event);
} else {
revert: true;
console.log('revert');
}
},
I see in the doc that there is a dragRevertDuration but I can't find the revert itself, is there one?
yes it does, pretty simple
eventDrop: function (event, dayDelta, minuteDelta, allDay, revertFunc) {
if (event.isPublished == 0){
addEditEvent(event);
} else {
revertFunc();
console.log('revert');
}
}
精彩评论