The data property holds the raw event data object used by DayPilot.Event constructor.
Declaration
DayPilot.Event.dataDayPilot Pro
Core properties (all components)
id(string or number)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 number; optional)
In the Queue component, the start and end properties can be replaced by duration (a DayPilot.Duration object or a number specifying the duration in seconds).
Optional properties (all components except of Queue)
areas(array of objects with properties defined in DayPilot.Area class)backColor(string) - defines the event background color using inlinebackgroundCSS stylebackImage(string) - defines the background image (CSS syntax)backRepeat(string) - defines the background image repeat rule (CSS syntax)borderColor(string) - defines border color using inline CSS; use"darker"to apply a darker shade of the background colorbubbleHtml(string, static bubble HTML)clickDisabled(boolean) - set totrueto disable event clickcontextMenu(DayPilot.Menu object) - custom context menucssClass(string) - custom CSS class (accepts multiple classes, separated by space)deleteDisabled(boolean) - set to true to disable event deleting using the built-in icondoubleClickDisabled(boolean) - set to true to disable event double clickfontColor(string) - defines the foreground color using inlinecolorCSS stylehidden(boolean) - set totrueto hide the eventhtml(string) - sets the raw HTML (if not specified, HTML-encoded value oftextis used)moveDisabled(boolean) - set totrueto disable event movingmoveSkipNonBusinessDisabled(boolean) - set totrueto disable skipping non-business time segments during event moving for selected events; available since 2025.1.6333recurrent(boolean) - used in ASP.NET WebForms, ASP.NET MVC and Java versions (read-only)recurrentMasterId- recurrent master id, used in ASP.NET WebForms, ASP.NET MVC and Java versions (read-only)resizeDisabled(boolean) - set totrueto disable event resizingrightClickDisabled(boolean) - set totrueto disable event right clicksort(array of strings) - defines values used for sortingtags(object) - stores custom event propertiestoolTip(string) - if not specified,textvalue is used
Optional properties (Scheduler)
ariaLabel(string) - accessibility label (ARIA); available since 2026.3.6967barBackColor(string) - CSS color of the event bar foregroundbarColor(string) - CSS color of the event bar backgroundbarHidden(boolean) - usetrueto hide the event barborderRadius(string or number) - applies a customborder-radiusstyle (number values will be transformed topx); available since 2024.3.6155 (see also eventBorderRadius)bubbleHtml(string) - HTML content of the bubble that appears on hoverclickDisabled(boolean) - usetrueto disable event clickcomplete(number) - progress percentage that will be used for the event bar in percent complete modecontainer(string or number) - specifies the container id; available since 2019.4.4052height(number) - custom height in pixels; available since 7.9.1266htmlLeft(string) - the HTML displayed next to the event, on the left sidehtmlRight(string) - the HTML displayed next to the event, on the right sideline(number or"dedicated") - forced line position within a row - see scheduler event placement strategieslinkCreateDisabled(boolean) - disables drag and drop link creation for this event (no link points will be visible on hover); available since 2023.2.5567linkCreateFinishDisabled(boolean) - disables drag and drop link creation for the end of this event (the end link point will not be visible on hover); available since 2023.2.6625linkCreateStartDisabled(boolean) - disables drag and drop link creation for the start of this event (the start link point will not be visible on hover); available since 2023.2.6625minLine(number) - the event will be placed on the line with the specified number, or on the next available higher line if that one is not free; available since 2025.1.6418moveVDisabled(boolean) - usetrueto disable vertical movingmoveHDisabled(boolean) - usetrueto disable horizontal movingpadding(string or number) - applies a custompaddingstyle (number values will be transformed topx); available since 2024.4.6200 (see also eventPadding)selectDisabled(boolean) - prevents an event from being selected using UI and API; available since 2026.1.6884)versions(array of objects) - defines event versions; each item can have the following properties: areas, start, end, text, html, backColor, fontColor, borderColor, backImage, backRepeat, complete, barColor, barBackColor, barImageUrl, barHidden, htmlRight, htmlLeft, cssClass, toolTip
Optional properties (Calendar)
allday(boolean)barColor(string)barBackColor(string)barHidden(boolean)durationBarImageUrl(string; ignored in cssOnly mode)
Optional properties (Queue)
areas(array of objects with properties defined in DayPilot.Area class)backColor(string)backImage(string)backRepeat(string)barColor(string)barHidden(boolean)borderColor(string)borderRadius(string or number) - applies a customborder-radiusstyle (number values will be transformed topx); available since 2024.3.6180 (see also eventBorderRadius)bubbleHtml(string, static bubble HTML) - available since 2022.4.5467contextMenu(DayPilot.Menu)cssClass(string)fontColor(string)html(string; if not specified, text is used)
DayPilot Lite
Core properties (all components)
id(string or number)text(string)start(string or DayPilot.Date)end(string or DayPilot.Date)
Optional properties (Calendar)
backColor(string)barBackColor(string)barColor(string)barHidden(boolean)borderColor(since 1.3.205)cssClass(string)fontColor(string; since 1.3.205)html(string)resource(string or number)tags(object) - stores custom event propertiestoolTip(string)
Optional properties (Month)
backColor(string; since 1.2.172)borderColor(string; since 1.3.215)cssClass(string; since 1.2.172)fontColor(string; since 1.3.215)html(string)tags(object) - stores custom event propertiestoolTip(string)
Example
const data = {
id: 1,
start: "2027-12-01T09:00:00",
end: "2027-12-01T13:00:00",
text: "Event 1",
cssClass: "my-event",
resizeDisabled: true
};
const 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 the tags object:
const data = {
id: 1,
start: "2027-12-01T09:00:00",
end: "2027-12-01T13:00:00",
text: "Event 1",
cssClass: "my-event",
resizeDisabled: true,
tags : {
category: "category1"
}
};
const e = new DayPilot.Event(data);You can access the custom tag values using DayPilot.Event.tag() method:
const category = e.tag("category"); // "category1"See Also
Event Loading [doc.daypilot.org]
Event Customization [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot