DayPilot.Scheduler(id, options);
Note: "options" are supported since DayPilot Pro 7.9
You can set the Scheduler properties and event handlers using options parameter. It accepts all Scheduler properties and events and also several special properties described in update() method documentation.
HTML
<div id="dps"></div>
JavaScript
var scheduler = new DayPilot.Scheduler("dps"); scheduler.theme = "scheduler_white"; scheduler.events.list = [ { id: 1, start: "2015-01-01T00:00:00", end: "2015-01-01T15:00:00", text: "Event 1", resource: "R1" } ]; scheduler.resources = [ { id: "R1", name: "Resource 1" } ]; scheduler.init(); scheduler.scrollTo("2015-01-01");
Initialization with properties
var scheduler = new DayPilot.Scheduler("dps", { theme: "scheduler_white", events: [ { id: 1, start: "2015-01-01T00:00:00", end: "2015-01-01T15:00:00", text: "Event 1" } ], resources: [ { id: "R1", name: "Resource 1" } ], scrollTo: "2015-01-01" }); scheduler.init();