The scrollTo() method also accepts DayPilot.Date object/ISO 8601 date string so you can use it to scroll to a specific point in time.
The Angular 2 version also supports scrollTo as a property of the config:
import {Component} from '@angular/core';
import {DayPilot} from "daypilot-pro-angular";
@Component({
selector: 'angular2-scheduler-example',
template: `<daypilot-scheduler [config]="config"></daypilot-scheduler`
})
export class AppComponent {
config: any = {
// ...
scrollTo: DayPilot.Date.today()
}
}
It's broken in the latest official release (8.3.2573) but it's working again in the latest sandbox build (since 8.3.2575).
The following scrolling-related config properties are also supported:
- scrollX (position in pixels)
- scrollY (position in pixels)
- scrollToAnimated (scrollTo animation type: null | speedInSteps | "slow" | "normal" | "fast" | "linear")
- scrollToPosition (scrollTo target position: "left" | "middle" | "right")