Scheduler scroll_hour

I want to configure my scheduler to start showing 7 AM (but be able to scroll up to 0 AM).

I have the following config option:

scheduler.config.scroll_hour = 7;
scheduler.init('scheduler')

On the first init, it works fine. But when I navigate away and then come back to the page (and run the same init function again) it ignores the scroll_hour property and starts at 0 AM.

It doesn’t change when I run scheduler.setCurrentView().

Is there a way to do this?

Thanks

Hi,

Please, use scrollTop when ‘onViewChange’ event fires.

scheduler.attachEvent("onViewChange", function (new_mode , new_date){ var targetEl = document.getElementsByClassName("dhx_cal_data")[0]; targetEl.scrollTop = this.config.hour_size_px*(this.config.scroll_hour-this.config.first_hour); });

Example docs.dhtmlx.com/scheduler/snippet/001b3828