2014-12-05 115 views
0

如果創建新事件的ajax調用成功,我想重新加載此頁面fullcalendar。但是,調用refetchEvents似乎完全沒有影響 - 並且使用chrome觀察網絡流量顯示沒有對fullcalendar查詢事件的URL進行調用。我錯過了什麼?FullCalendar refetchEvents無法重新加載日曆

function submitNewEvent(event) { 
     event.preventDefault(); 
     dnnEvent = dnnEventWithFormData(); 
     $.ajax({ 
      type: 'post', 
      url: urlCreateEvent, 
      data: dnnEvent 
     }).success(function (response) { 
      dialog.dialog('close'); 
      $("#userEvents").load(urlUserEvents); 
      $("#calendar").fullCalendar('refetchEvents'); 
     }).error(function (response) { console.log(response); alert('failed'); }); 
} 

回答

1

嘗試:

var mycal = $("#calendar)....init... 

然後在.success

mycal.fullCalendar('refetchEvents'); 
相關問題