DayPilot.Scheduler.scrollTo

DayPilot.Scheduler.scrollTo(date, animated, position);

Sets the horizontal scrollbar position (left) to the target date.

Parameters

  • date (string in ISO 8601 format, DayPilot.Date object) - target date
  • animated (boolean) - use animated scrolling (default is false)
  • 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

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java