Our pure JavaScript Scheduler component


Post by peaguilar »

Hello,

I am trying to add a listener on the horizontal scroll in hope to get the current date time range that the time axis is on. I see that there is a onTimeAxisChange listener, however this only fires when you are zooming in and out. Also presetChange listener is the same. But I cant seem to find a way to listen on the schedulers horizontal scroll. Is there a listener that I am missing? Or something else that would output the current date range that is in view as you scroll horizontally on scheduler. We are using scheduler pro.


Post by peaguilar »

One thing I should ask is I am using this to try to figure a workaround to have a default date to today, and allow the scheduler to not jump back to now when new data comes in. Having issues with scheduler rerendering when new data come, and when this happens it will trigger the visibleDate prop to render again, which makes the scheduler jump back to today after scrolling.


Post by alex.l »

All the best,
Alex


Post by Animal »

Or even easier: https://bryntum.com/products/scheduler/docs/api/Scheduler/view/TimelineBase#event-visibleDateRangeChange

But this is just plastering over a problem.

"to not jump back to now when new data comes in. Having issues with scheduler rerendering when new data come, and when this happens it will trigger the visibleDate prop to render again"

Not sure what this means? "New data"? Just setting data will not cause scroll.

Obviously if you set visibleDate (which is not data, it is a property of the Scheduler) it will scroll to that date. If you do not want that, then don't set visibleDate


Post Reply