DayPilot.Calendar Constructor

Declaration

DayPilot.Calendar(id, options);

Parameters

  • id - id of the placeholder <div> element

  • options - object, properties to be set

You can set the event calendar properties using options parameter. It accepts all Calendar properties and events and the following special properties:

  • events - event array, will be loaded to events.list

  • scrollToHour - initial scroll position hour

Example

HTML

<div id="dpc"></div>

JavaScript

var calendar = new DayPilot.Calendar("dpc");

Initialization with properties

var calendar = new DayPilot.Calendar("dpc", { 
  viewType: "Week",
  onEventClick: function(args) {
    alert("Event clicked: " + args.e.text());
  },
  scrollToHour: 10
});