wil*_*fun 6 jquery fullcalendar
我有一个功能性的fullCalendar http://arshaw.com/fullcalendar/正在从Google日历中检索单个来源,用于这样的事件:
$('#calendar').fullCalendar({
events: $.fullCalendar.gcalFeed(
"http://www.google.com/calendar/feeds/etc", // feed URL
{ className: 'gcal-events' } // optional options
)
});
Run Code Online (Sandbox Code Playgroud)
然而,我的挑战是有多个Feed.fullCalendar文档说:
eventSources:Array类似于'events'选项,除了可以指定多个源.例如,可以指定JSON URL的数组,自定义函数的数组,硬编码事件数组的数组或任何组合.
但是没有例子,所以这里的JSON新手有点卡住了.
关于使用eventSources和feed数组需要什么的任何想法?
找到解决方案; http://code.google.com/p/fullcalendar/issues/detail?id=192&q=eventSources
eventSources:
[
'msCal.txt', // location of Cal JSON script
'msLogBook.txt', // location of LogBook JSON object
'msEvents.txt' //location of the Events JSON object
]
Run Code Online (Sandbox Code Playgroud)
回想起来非常简单.以下是我的测试页面;
eventSources:
[
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.australian%23holiday%40group.v.calendar.google.com/public/basic'),
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.indonesian%23holiday%40group.v.calendar.google.com/public/basic')
],
Run Code Online (Sandbox Code Playgroud)