FullCalendar refetchEvents不重新加载日历 [英] FullCalendar refetchEvents not reloading calendar
本文介绍了FullCalendar refetchEvents不重新加载日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果创建新事件的ajax调用成功,我想重新加载这个页面fullcalendar。但是,调用refetchEvents似乎完全没有影响 - 并且使用chrome观察网络流量显示没有对fullcalendar查询事件的URL进行调用。我错过了什么?
If an ajax call to create a new event succeeds, I would like to reload this pages fullcalendar. However, calling refetchEvents seems to have absolutely no effect - and watching the network traffic in chrome shows that no call is being made to the URL where fullcalendar queries events. What am I missing?
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'); });
}
推荐答案
Try:
var mycal = $("#calendar)....init...
然后在您的 .success
:
mycal.fullCalendar('refetchEvents');
这篇关于FullCalendar refetchEvents不重新加载日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文