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');
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With