问题描述
我想创建一个带有计划事件的日历,因此我从数据库中将数据提取到控制器中,按需要将它们处理为格式,然后返回事件对象的Json数组。但是,日历未显示daysofWeek事件。
//events is an array of primary key,which will later been used to retrieve data from database in controller
var a = JSON.stringify(events);
$(function () {
$.post('/SchedulingManager/Setvariable',{ key: a,value: "Test" },function (result) {
GenerateCalendar(result);
});
});
}));
function GenerateCalendar(array) {
$('#calendar'). fullCalendar({
//theme: true,header: {
left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'
},buttonText: {
today: 'Today',month: 'Month',week: 'Week',day: 'Day',},timeFormat: 'hh:mm a',selectable: true,defaultview: 'month',editable: true,allDaySlot: true,slotMinutes: 15,events:array,})
}
})();
This is the JSON array that is return from the controller 但是,日历只显示具有固定日期的事件,而不显示具有daysofWeek属性的事件。(并且在另一种情况下显示的时间也是错误的)。但是,当我复制完全相同的代码时
{ dow: '[1,2,3,4,5]',title: 'OFA-0001 : (test event log)',start: ' 10:00:00 ',end: '11:00:00 ' }
事件显示。 Event is shown if I create the array in view
有人会帮我解决这个问题吗?谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)