Jquery – How to use multiple sources with the jQuery plugin fullCalendar

fullcalendarjquery

I've got a functional fullCalendar http://arshaw.com/fullcalendar/ working retrieving a single source from Google Calendar for the events like so:

$('#calendar').fullCalendar({

   events: $.fullCalendar.gcalFeed(
      "http://www.google.com/calendar/feeds/etc",   // feed URL
      { className: 'gcal-events' }                  // optional options
   )

     });

My challenge is however to have multiple feeds coming in. The fullCalendar documentation says:

eventSources: Array
Similar to the 'events' options, except one may specify multiple sources. For example, one may specify an array of JSON URL’s, an array of custom functions, an array of hardcoded event arrays, or any combination.

But there is no example and so this JSON newbie here is a little bit stuck.

Any ideas on what it would need to use eventSources and an array of the feeds?

Best Answer

Found solution here; 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
]

Painfully simple in retrospect. The following is working on my test page;

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')
],