0
我用一个函数来获取我的事件:refetchevents没有得到新的事件
events: function (start, end, timezone, callback) {
$.ajax({
url: '/Controller/GetDiaryEvents/',
data: {
当我添加一个新的事件,日历不显示新添加的事件。我需要重置我的eventsource吗?
success: function (response) {
debugger;
if (response == true) {
$('#calendar').fullCalendar('refetchEvents');
alert('New event saved!');
}
此链接FullCalendar refetchEvents not reloading calendar说做Calendar..init,但我没有看到这种方法。
根据你显示的代码,没有理由不应该工作。你是否证实事件确实存储在你的数据库中?调用“refetchEvents”是否肯定会触发ajax调用来获取事件,或者您在控制台中是否有错误?如果它提取事件,响应是否包含您的新事件,或者不是?使用浏览器工具和数据库GUI进行一些基本的调试。 – ADyson