我正在使用fullcalendar并从ajax调用中填充日历。
,但是如果将allday设置为false
,我将无法显示时间显示我正在寻找FullCalendar,没有显示JSON活动的时间,但似乎没有帮助。
这是我要回来的JSON:
] [{" id":" 18"," title":" r2222"," start":" 2012-10-02 08:00:00","结束:" 2012-10-02 11:00:00"," textColor":"#000000"," allday":false," color":"#ffffff"},
{" id":" 1"," title":"测试 123"," start":" 2012-10-16"," end":null," textcolor":"#000000"," allday":false," color":"#ffffff"},
{" id":" 16"," title":"快乐 gallown","开始":" 2012-10-31","结束:" 2012-10-31"," TextColor":"#fffcfc"," Allday":true,true," color":"#D92727"},
{" id":" 17"," title":" recur"," start":" 2012-10-03 19:00:00","结束:" 2012-10-03 21:00:00"," textColor":"#000000"," allday":false," color":"#ff56ff"}]
allDay
是case敏感的;将其从allday
更改为allDay
-我只花了25分钟自己搜寻这个。
您可以按照此allday
遵循allDay
,并且时间应该开始:2010-01-09T12:30:00
需要在日期和时间之间添加T
。
events: [
{
title : 'event1',
start : '2010-01-01'
},
{
title : 'event2',
start : '2010-01-05',
end : '2010-01-07'
},
{
title : 'event3',
start : '2010-01-09T12:30:00',
allDay : false // will make the time show
}
]