我曾经有
$('#calendar').fullCalendar({
//some properties...
events: "/Agenda/GetEvents/",
});
它工作正常,我的事件显示正确。现在我想更新组合框选择上的事件(重新获取),所以这就是我所做的更改:
$('#calendar').fullCalendar({
//some properties...
events: function (start, end) {
$.ajax({
url: '/Agenda/GetEvents/',
dataType: 'json',
data: {
start: Math.round(start.getTime() / 1000),
end: Math.round(end.getTime() / 1000),
utilisateur: $("#Utilisateur option:selected").val()
}
});
$('#Calendar').fullCalendar('refetchEvents');
},
});
/Agenda/GetEvents/ 的 url 被正确调用并返回一个事件,但它不会再显示在日历上。难道我做错了什么?