| Issue 56: | Get loaded events | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I want to be able to get loaded events in the calendar as an array at any time.
For example like this:
var events = [];
events = $('#fullcalendar').fullCalendar('getEvents'); // Get all events
Or this:
var events = [];
events = $('#fullcalendar').fullCalendar('getEventSource','http://localhost/');
Is this possible?
Jul 11, 2009
Ehhm, the 224 above is the line number.
Meaning right below this code:
getEventsById: function(eventId) {
var res = [];
for (var i=0; i<events.length; i++) {
if (events[i].id === eventId) {
res.push(events[i]);
}
}
return res;
},
sorry for spam
Jul 13, 2009
Wuhhh! Wonderful! Thank you! Vote for the addition of this method in the Trunk? ;)
Jul 18, 2009
this is a good idea. will include it in next release. Max + thgreasi, thanks
Status:
Accepted
Jul 31, 2009
(No comment was entered for this change.)
Labels:
-Type-Defect Type-Enhancement
Sep 21, 2009
just came out with 1.3, which has the 'clientEvents' method (http://arshaw.com/fullcalendar/docs/methods.php). hope this helps, let me know if any troubles. thanks.
Status:
Fixed
Aug 13, 2013
(No comment was entered for this change.)
Status:
Implemented
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |
I have edited the code (of the js file i downloaded) (I used notepad++) to have this functionality available to my site. You need to open fullcalendar.js and go to 224 and paste the following lines: getEvents: function() { return events; }, Note that the comma at the end is important. Save and exit. From now and on you can make a call like this: var events=$('#month-calendar').fullCalendar('getEvents'); The above will return a table with the events that fullcallendar HAVE loaded. Hope I helped