My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 56: Get loaded events
2 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Aug 2013


Sign in to add a comment
 
Reported by Max.Kama...@gmail.com, Jul 9, 2009
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
#1 thgre...@gmail.com
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
Jul 11, 2009
#2 thgre...@gmail.com
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
#3 Max.Kama...@gmail.com
Wuhhh! Wonderful! Thank you! 

Vote for the addition of this method in the Trunk? ;)
Jul 18, 2009
Project Member #4 adamrs...@gmail.com
this is a good idea. will include it in next release. Max + thgreasi, thanks
Status: Accepted
Jul 31, 2009
Project Member #5 adamrs...@gmail.com
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Sep 21, 2009
Project Member #6 adamrs...@gmail.com
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
Project Member #7 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Implemented
Aug 13, 2013
Project Member #8 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting