1
我正在使用FullCalendar jQuery plugin,並嘗試通過單擊自定義按鈕來加載來自其他源的事件。如何使用其他事件源的數據重新加載jQuery FullCalendar?
日曆用FIRST_REQUEST url返回的結果正確初始化,但是當單擊自定義按鈕時,日曆不會使用SECOND_REQUEST url中的json數據重新加載。
這裏是我的代碼:
$('#calendar').fullCalendar({
'locale' : 'fr',
'customButtons' : {
myCustomButton: {
text: global.labelAllEvents,
click: function() {
$('#calendar').fullCalendar('refetchEventSources', {
url: '../url/SECOND_REQUEST'
});
}
}
},
'header' : {
left: 'prev,next today myCustomButton',
center: 'title',
right: 'month,agendaWeek,agendaDay,listMonth'
},
'defaultView' : window.mobilecheck() ? "basicDay" : "month",
'firstDay' : 1,
'eventLimit' : true,
'events' : '../url/FIRST_REQUEST?code='+parent.codeLiveroom ,
'eventColor' : 'lightBlue',
'eventTextColor': 'black',
'editable' : true,
'selectable' : true,
'longPressDelay': 500,
'timeFormat' : 'H:mm'
});
在此先感謝。
Remi
謝謝@ MVG1984 – rem