这就是数据传递的方式。
$items[] = array(
'title' => 'Meeting',
'start' => strtotime('2014-09-09'),
'color' => '#CC0000',
'allDay' => true,
'url' => 'http://anyurl.com'
);
$items[] = array(
'title' => 'Meeting reminder',
'start' => '2014-09-15 05:20:17',
'end' => '2014-09-15 05:30:17',
'color' => 'blue',
);
echo CJSON::encode($items);
Yii::app()->end();
我遇到的另一个问题是当启用 true 时,如下所示
'editable'=>'true',
'selectable' => true,
属性“EFullCalendar.editable”未定义。 属性“EFullCalendar.selectable”未定义。
这就是它应该如何工作,http://fullcalendar.io/js/fullcalendar-2.1.1/demos/external-dragging.html
最佳答案
如果所有事件都显示为“全天”,请确保您没有将 allDayDefault
设置为 true
( take a look at the docs )。
对于第二个问题,请确保 editable
为 true
( bool 值而不是字符串)。如果仍然不起作用,请包含您为 fullCalendar 设置默认选项的 JavaScript。
关于javascript - 全日历事件总是出现在全天事件时段以及如何编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25862366/