1
我一直在試圖讓fullcalendar對新事件的輪詢作出反應,但每當它調用refetchEvents,如果我拖動或調整某些東西,它會阻止我,就好像我在我所在的位置釋放了鼠標,這會將事件分別移動或調整到錯誤的位置。如何停止fullcalendar中斷拖動和調查時調整大小
我有一個jsfiddle,以顯示此操作。
下面是代碼,如果它可以幫助:發佈=== false
只
$(document).ready(function() {
/* initialize the calendar
-----------------------------------------------------------------*/
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
events: [{
title: 'event1',
start: '2017-01-26T08:00:00',
end: '2017-01-26T10:00:00'
}, {
title: 'event2',
start: '2017-01-05',
end: '2017-01-07'
}, {
title: 'event3',
start: '2017-01-09T06:30:00',
end: '2017-01-09T09:30:00',
}]
});
});
setInterval(function() {
$('#calendar').fullCalendar('refetchEvents');
console.log('refetchEvents called');
}, 5000);
對於我來說,這足夠好用,除了它需要eventResizeStart:toggleLock和eventResizeStop:toggleLock以及。 –