Our pure JavaScript Scheduler component


Post by abisht »

Hi,
How can we keep the horizontal scrollbar to current time in bryntum scheduler?


Post by tasnim »

Hi,
For that, you could use https://bryntum.com/products/scheduler/docs/api/Scheduler/view/mixin/TimelineScroll#function-scrollToDate method

scheduler.scrollToDate(new Date());

Post by abisht »

Hi,

I tried scheduler.scrollToDate(new Date()) and scheduler.scrollToNow but it didn't work. Is there anything which I missed?


Post by tasnim »

Hi,

It seems to be working fine with our online scheduler basic demo https://bryntum.com/products/scheduler/examples/basic/

What version are you using?

Attachments
chrome_69nzDYfzol.gif
chrome_69nzDYfzol.gif (407.29 KiB) Viewed 147 times

Post by abisht »

Hi,

It worked, but the challenge here is that I have 4 views of time, today, tomorrow, yesterday and current time and the scrollbar comes to current time in all the views. How can I keep the scrollbar to current time in only current day view.


Post by alex.l »

Hi, you can check current view before call this method. What's the problem in, could you please describe it in more words?
pseudo code

if (currentView.id === currentDayViewId) {
    scheduler.scrollToDate(new Date());
}

All the best,
Alex


Post Reply