问题
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 ?
回答1:
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...
));
?>
来源:https://stackoverflow.com/questions/6061311/eventsources-to-events-json-full-calendar