如何在 Jquery fullcalendar 中刷新事件数据
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16822969/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 17:52:27 来源:igfitidea点击:
How to refresh Event data in Jquery fullcalendar
提问by D-W
Im Trying to reload my event data(JSON) when the viewDisplay function is called, not to sure how I call it tho?
我试图在调用 viewDisplay 函数时重新加载我的事件数据(JSON),但不确定我如何称呼它?
$('#calendar').fullCalendar({
defaultView: '@Model.ScheduleView',
editable: true,
events: '/Schedule/GetSchedule',
viewDisplay:function (view) {
if (view.name == "resourceDay") {
//Call refresh of events to fire ('/Schedule/GetSchedule') <---- This line
}
}
回答by Filippos Karapetis
You can use the refetchEvents() function:
您可以使用 refetchEvents() 函数:
http://arshaw.com/fullcalendar/docs/event_data/refetchEvents/
http://arshaw.com/fullcalendar/docs/event_data/refetchEvents/