DayPilot.Event.data

Holds the raw event data. Use this structure when passing event data to DayPilot.Event() constructor.

DayPilot Pro

Core properties (all controls)

  • id (string or integer)
  • text (string)
  • start (DayPilot.Date object or string in ISO 8601 format)
  • end (DayPilot.Date object or string in ISO 8601 format)
  • resource (string or integer; optional)

Optional properties (all controls)

  • areas (array of objects with properties defined in DayPilot.Area class)
  • backColor (string)
  • backImage (string)
  • backRepeat (string)
  • borderColor (string)
  • bubbleHtml (string, static bubble HTML)
  • clickDisabled (boolean, set to true to disable event click)
  • contextMenu (string or DayPilot.Menu object)
  • cssClass (string)
  • deleteDisabled (boolean, set to true to disable event deleting using the built-in icon)
  • doubleClickDisabled (boolean, set to true to disable event double click)
  • fontColor (string)
  • hidden (boolean)
  • html (string; if not specified, text is used)
  • moveDisabled (boolean, set to true to disable event moving)
  • recurrent (boolean, used in ASP.NET WebForms, ASP.NET MVC and Java versions)
  • recurrentMasterId (boolean, used in ASP.NET WebForms, ASP.NET MVC and Java versions)
  • resizeDisabled (boolean, set to true to disable event resizing)
  • rightClickDisabled (boolean, set to true to disable event right click)
  • sort (array of strings)
  • tags (object with properties)
  • toolTip (string; if not specified, text is used)

Optional properties (Scheduler):

  • barBackColor (string)
  • barColor (string)
  • barHidden (boolean)
  • bubbleHtml (string)
  • clickDisabled (boolean)
  • complete (integer; progress percentage)
  • durationBarImageUrl (ignored in cssOnly mode)
  • height (integer; custom height in pixels; available since 7.9.1266)
  • moveVDisabled (boolean)
  • moveHDisabled (boolean)

Optional properties (Calendar):

  • barColor (string)
  • barBackColor (string)
  • barHidden (boolean)
  • durationBarImageUrl (string; ignored in cssOnly mode)

DayPilot Lite

Core properties (all controls)

  • id
  • text
  • start
  • end

Optional properties (Calendar):

  • backColor
  • barBackColor
  • barColor
  • barHidden
  • borderColor (since 1.3.205)
  • cssClass
  • fontColor (since 1.3.205)
  • html
  • toolTip

Optional properties (Month):

  • backColor (since 1.2.172)
  • borderColor (since 1.3.215)
  • cssClass (since 1.2.172)
  • fontColor (since 1.3.215)
  • html
  • toolTip

Example

var data = {
  id: "1"
  start: "2015-01-01T09:00:00",
  end: "2015-01-01T13:00:00",
  text: "Event 1",
  cssClass: "my-event",
  resizeDisabled: true
};

var e = new DayPilot.Event(data);

Storing Custom Properties

In order to avoid collision with property names that might be added in the future it is recommended to store custom properties in tags object:

var data = {
  id: "1"
  start: "2015-01-01T09:00:00",
  end: "2015-01-01T13:00:00",
  text: "Event 1",
  cssClass: "my-event",
  resizeDisabled: true,
  tags : {
    category: "category1"
  }
};

var e = new DayPilot.Event(data);

You can reach the custom tag values using DayPilot.Event.tag() method:

vat category = e.tag("category");  // "category1"

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