eventSources到事件Json,完整的日历 [英] eventSources to events Json, full calendar
本文介绍了eventSources到事件Json,完整的日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在eventSources中返回的json是:
[{title:Title Test,start:1305841052}]
pre>
当我将此字符串过滤到事件中时,它会正确显示日期。
是否有我缺少的东西?解决方案初始化日历时,请确保具有以下内容:
$('#calendar')。fullCalendar({
event:json-feed.php,
// more inits ...
})
您的json-feed。 php文件应该类似于以下内容:
<?php
echo json_encode(array(
array(
'id'=> 123,
'title'=>myevent,
'start'=>2011-05-24 10:05:00 ,
'end'=>2011-05-24 11:55:00,
'allDay'=> false
),
//多个事件。 ..
));
?>
I'm trying to get my json call from eventSources to my events.
The json I get back in my eventSources is :
[{"title":"Title Test","start":"1305841052"}]
When I past this string into events, it display's the date correctly. Is there something i'm missing ?
解决方案when you initialize the calendar, be sure to have the following:
$('#calendar').fullCalendar({ event: "json-feed.php", //more inits... })
your json-feed.php file should look similar to the following:
<?php echo json_encode( array( array( 'id' => 123, 'title' => "myevent", 'start' => "2011-05-24 10:05:00", 'end' => "2011-05-24 11:55:00", 'allDay' => false ), //more events... )); ?>
这篇关于eventSources到事件Json,完整的日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文