I stumbled upon scheduler.getEvents(startDate, endDate) which easily narrows the events to selected dates and can be called in onBeforeViewChange.
Is there an event function which always fires rendering is complete?
When the page firsts loads the events happen in this order:
onBeforeViewChange
onViewChange
filter_unit
render
onXLE
When the view is changed, the events are called in this order:
onBeforeViewChange
filter_unit
render
onViewChange
In order for this to work, I need to put the scheduler.getEvents() logic to mark the events in onXLE and in onViewChange. This is ok, it works. Just wondering if there might be an onAfterViewChange or an event which always is fired after page rendering.
Also is there a way to get the start/end date of what’s currently being shown onscreen. I hacked together some logic which is working. If there’s some property which has the rendering start/end date I would rather use it instead of calculating it.
onViewChange fires every time your view is changed (rendering completed). If you want to perform any action after data loading you should check onXLE docs.dhtmlx.com/scheduler/api__s … event.html .
The documentation is somewhat misleading:
“onViewChange fires every time your view is changed (rendering completed)”
If you load data, all the renderEvent() are called, the filter_unit() functions called and the onViewChange is NOT called.
Maybe one day, there might be an onAfterRender() event when is called after all of renderEvent() functions are called. In the meantime, I can use onXLE. So far, I can do everything I’ve needed to do through the APIs – a good sign that this is a great framework.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan