Jquery Fullcalendar未显示事件
我在FullCalendar中遇到问题,它无法显示我的事件。我认为事件数据的格式可能不正确,但我看不出应该是什么 下面的代码是我的代码的简化版本:Jquery Fullcalendar未显示事件,jquery,asp.net-mvc,fullcalendar,Jquery,Asp.net Mvc,Fullcalendar,我在FullCalendar中遇到问题,它无法显示我的事件。我认为事件数据的格式可能不正确,但我看不出应该是什么 下面的代码是我的代码的简化版本: jQuery('#cal').fullCalendar({ defaultView: 'agendaDay', axisFormat: 'H', //,'h(:mm)tt', timeFormat: { agenda
jQuery('#cal').fullCalendar({
defaultView: 'agendaDay',
axisFormat: 'H', //,'h(:mm)tt',
timeFormat: {
agenda: 'H' //h:mm{ - h:mm}'
},
firstHour: 18,
eventSources:
[{"id":64,"title":"TestUser","start":"2011-03-08T02:00:00.0000000","end":"2011-03-08T04:00:00.0000000","allDay":false},{"id":65,"title":"TestUser","start":"2011-03-07T10:00:00.0000000","end":"2011-03-07T12:00:00.0000000","allDay":false}]
,
eventClick: function (calEvent, jsEvent, view) {
jQuery('#divEventTitle').html(calEvent.title);
showEvent(calEvent);
jQuery('#divEvent').dialog();
},
theme: true,
header: false,
height: 450
});
直接传递事件数据时,要使用的属性是“events”,而不是“eventSources” 另外,您告诉它显示“agendaDay”,它将仅以逐小时视图显示当前日期。由于今天是3月6日,而您的活动是3月7日和8日,因此在初始页面加载时不会显示这些活动