Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/454.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php FullCalendar无法将时间插入日历_Php_Javascript_Jquery_Fullcalendar - Fatal编程技术网

Php FullCalendar无法将时间插入日历

Php FullCalendar无法将时间插入日历,php,javascript,jquery,fullcalendar,Php,Javascript,Jquery,Fullcalendar,我一直在使用标准的ISO日期时间格式插入完整的日历。测试时,我无法将时间输入日历,即使allDay字段设置为false。下面是我的php代码 $eventdt = date_format($eventdate,'c'); $eventet = date_format($eventend,'c'); $buildjson = array('id'=>"$eventtest",'title' => "$eventtest", 'start' => "$eventdt", 'en

我一直在使用标准的ISO日期时间格式插入完整的日历。测试时,我无法将时间输入日历,即使allDay字段设置为false。下面是我的php代码

$eventdt = date_format($eventdate,'c');
$eventet = date_format($eventend,'c'); 
 $buildjson = array('id'=>"$eventtest",'title' => "$eventtest", 'start' => "$eventdt", 'end' => "$eventet", 'allDay' => 'false', 'backgroundColor' => "$eventc");
array_push($jsonArray, $buildjson);
echo json_encode($jsonArray);
这段代码的输出是

[{"id":"106","title":"106","start":"2013-07-17T11:00:00+02:00","end":"2013-07-18T14:00:00+02:00","allDay":"false","backgroundColor":"#FF0000"},{"id":"107","title":"107","start":"2013-07-19T10:45:00+02:00","end":"2013-07-20T14:15:00+02:00","allDay":"false","backgroundColor":"#FF0000"},{"id":"108","title":"108","start":"2013-07-22T10:45:00+02:00","end":"2013-07-22T14:15:00+02:00","allDay":"false","backgroundColor":"#FF0000"},{"id":"109","title":"109","start":"2013-07-22T10:45:00+02:00","end":"2013-07-22T14:15:00+02:00","allDay":"false","backgroundColor":"#D7DF01"}]
我看到datetime标签额外增加了+2:00,这是本地时区。当我试图在脚本中手动插入值时,时间会反映在日历上

手动插入:

events: [   {
                title: 'class5 meeting',
                start: '2013-07-17T11:00:00',
                end: '2013-07-18T14:00:00',
                allDay: false,
                backgroundColor: '#ff0000'
                }
            ]
是否有任何方法可以调整日期并发送所需的值,以便反映这些值


提前谢谢

我认为问题可能在于,PHP生成的JSON中的'allDay'字段的
false
值是
字符串
,而FullCalendar期望的是
Bool

尝试按如下方式更改
$buildjson

$buildjson=array('id'=>“$eventtest”、'title'=>“$eventtest”、'start'=>“$eventdt”、'end'=>“$eventet”、'allDay'=>false、'backgroundColor'=>“$eventc”)(请注意,
false
没有用引号括起来)