fullCalendar Events from function

How to generate events using the fucntion eventsSource. All other ways use a json or xml ajax. This method you need to creat an jScript Array..

by ppumkin

HTML

<script src="http://www.kula.org.uk/publicscripts/fullcalendar/fullcalendar.min.js"></script>
<link rel="stylesheet" href="http://www.kula.org.uk/publicscripts/fullcalendar/fullcalendar.css">
<div id="mycalendar"> Calendar </div>

JavaScript

$('#mycalendar').fullCalendar(
    {
    header: 
        {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
        },
   editable: true,

   events:function(start,end,callback)
        {
            var event = [];
            event.push({
                title: 'Garten',
                start: '2011-05-10T00:00:00',
                allday: true
            });
           
            callback(event);
        }
  });