Callback for after all events are rendered?

I need to call a method after all events are rendered on the current view on the calendar.

My use case is that I want to populate a div with a list of the currently selected range when the calendar loads. An example would be the events for the week of March 2 - March 9. When the range changes (e.g. go to the next week), it should update that div again.

I’ve been looking for an event that I can attach to that would tell me it’s done rendering, but I haven’t found one that looks like it fits. I can’t use the load callback, because that only runs when more data is needed. I can’t use onViewChange, because the initial load doesn’t call that event.

Any ideas? Previously, I was using the FullCalendar jquery library which provides an eventAfterAllRender callback which ran when I needed.

Hi,
try onViewChange event, it triggers each time displayed mode or date range is refreshed
docs.dhtmlx.com/scheduler/api__s … event.html

onViewChange doesn’t fire when the calendar loads its initial view.

Also, it seems to fire before the new events are actually fetched, so I don’t think it will work for me.

Are there any other options or am I just out of luck?

Actually it does. Make sure you attach event handler before calling scheduler.init
Seems like loading data with scheduler.load does not trigger the event. You may also trace onXLE event, which triggers after data loaded and displayed[code]function onRenderHandler(){

}

scheduler.attachEvent(“onViewChange”, onRenderHandler);
scheduler.attachEvent(“onXLE”, onRenderHandler);

scheduler.init(“scheduler_here”);[/code]

I ended up having to do both like you suggested.

onViewChanged doesn’t have the data yet when the calendar first loads, so I had to lean on onXLE to get the first load working.