DayPilot.Scheduler.scrollTo

DayPilot.Scheduler.scrollTo(date | pixels[, animated[, position]]);

Sets the horizontal scrollbar position to the target date.

Parameters

  • date (string in ISO 8601 format, DayPilot.Date object) - target date
  • pixels (number) - target position in pixels
  • animated ("fast" | "normal" | "slow" | "linear") - scrolling animation; null means no scrolling, "linear" adjusts the speed depending on distance 
  • position ("left", "middle", "right") - target position of  "date" (default is "left")

Examples

Scroll to current time.

dp.scrollTo(new DayPilot.Date());

Scroll to January 1, 2017:

dp.scrollTo("2017-01-01");

Demo