Get all the events as JSON


I want to get all the events to JSON on click of a button which is outside the calendar.

the scheduler.getEvents() returns me an empty array always, it does this when i pass the start date and the the end date too. not sure whats going on there.

anyway I was trying the other function scheduler.toJSON() this kind of does what i need, but it returns the recurring events with the rec_types, is there anyway I can get the actual events. I am not using recurring events with no end date. all of the recurring events have a limit.

also i found this variable which contains all the events schedular._events, but it only has to events which are in the current visible calendar, otherwise that works for my requirement.

any help much appreciated.

I have this problem too… I want to get whole events on calender. Cannot get whole events either JSON format or separate events objects
any one can help ?

Can you share a code snippet where getEvents doesn’t work for you ?
Normally this command must return array of event objects ( json ) for the defined date range.