scheduler.getEvents() not returning events

Hi,

I am trying to get the list of events, I am calling getEvents after the scheduler is loaded but when getting a list size of the event array it gives me a value of 0 showing no events. Events are rendered on scheduler and are in the DB so I don’t know why this is giving me 0.


alert("Number of Events : " + scheduler.getEvents().length);   <-- Returns 0

Hi,
.getEvents should work correctly, make sure it’s called after data has been loaded to the scheduler.
Try calling it from onXLE eventscheduler.attachEvent("onXLE", function(){ alert("Number of Events : " + scheduler.getEvents().length); });If it still returns 0, please attach a demo so we could test the problem