Automatically scroll to a certain time on day and week views

Hello,

Is there a way to automatically scroll to a time (say 8:00am) on the day and week views? Most of the bookings we are looking at occur between 9-5 so it would be great if the scroll bar could go half way down and show us the time of day we are most likely to see bookings.

Has this feature already been implemented?

Thanks,

Tim

Hello, Tim.

scheduler.config.scroll_hour = 8;

Also be sure to check Configuration options page.

Best regards,
Ilya

Hello,

Thanks for this.

Is there a way to ensure the timeline view is not affected by this scroll behavior? Clicking on a week or day view and then clicking on the timeline view causes the timeline to scroll down.

I’m not too worried though, only a minor bug.

Thanks,

Tim

Hello,

Thank you for reporting this problem.
Fix will be included in the upcoming version. Scroll_hour option should not affect timeline views.

To fix it locally open dhtmlxscheduler_timeline.js file:

  1. Locate following part:
"_start"](scheduler._date)

In uncompressed version this part looks like this:

scheduler.renderMatrix = function(mode){ var start_date = scheduler.date[this.name+"_start"](scheduler._date);
2. Edit it following way:

scheduler.renderMatrix = function(mode){ scheduler._els['dhx_cal_data'][0].scrollTop=0; // new line var start_date = scheduler.date[this.name+"_start"](scheduler._date);
Variable names may differ in your version.

Best regards,
Ilya