开发者

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');
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜