The scrollTo() method sets the horizontal scrollbar position of the JavaScript Scheduler to the specified date/time or pixel position.
DayPilot.Scheduler.scrollTo(date | pixels[, animated[, position]]);date (string in ISO 8601 format | DayPilot.Date) - target date/time
pixels (number) - target horizontal position in pixels
animated ("fast" | "normal" | "slow" | "linear") - scrolling animation; use null for no animation and "linear" to adjust speed based on distance
position ("left" | "middle" | "right") - target position of date within the viewport; the default is "left"
The move to the target position can be animated using the animated parameter.
You can control where the target date/time appears in the viewport using the position parameter.
When infinite scrolling is enabled, the Scheduler shifts the timeline automatically if the target date isn't in the current timeline.
Scroll to the current time.
dp.scrollTo(DayPilot.Date.now());Scroll to January 1, 2025.
dp.scrollTo("2025-01-01");DayPilot.Scheduler.setScrollX()
DayPilot.Scheduler.getScrollX()
DayPilot.Scheduler.scrollToResource()
Infinite Scrolling [doc.daypilot.org]