The onBeforeHeaderRender event handler lets you customize the column headers of the JavaScript Calendar component.
Declaration
DayPilot.Calendar.onBeforeHeaderRender(args);
Parameters
- args.header.areas (array) - an array of active area objects
- args.header.backColor (string) - custom column background color
- args.header.children (array) - child columns (read-only)
- args.header.cssClass (string) - custom CSS class (since version 2022.4.5481)
- args.header.html (string) - column HTML; if set, it will override the default content
- args.header.id (string | number - column ID, in resource calendar mode (read-only)
- args.header.name (string) - column text (read-only)
- args.header.start (DayPilot.Date) - column start date (read-only)
- args.header.toolTip (string) - custom column tooltip
Example
dp.onBeforeHeaderRender = (args) => {
args.header.html = args.header.start.toString("M/d/yyyy");
};