The onBeforeRowHeaderExport event handler fires during export (JPEG, PNG, SVG, Excel) and direct printing. It lets you customize the JavaScript Scheduler row header content and appearance in the exported output.
Declaration
DayPilot.Scheduler.onBeforeRowHeaderExport(args)Parameters
args.areas(DayPilot.AreaData[]): active areas for image exportargs.row(DayPilot.Row) - exported rowargs.columns(array) - exported visible row header columns; available since 2021.4.5143; in earlier versions this array was available asargs.row.columnsargs.text(string) - exported textargs.backColor(string) - exported background colorargs.borderColor(string) - exported border colorargs.fontColor(string) - exported font colorargs.fontFamily(string) - exported font familyargs.fontSize(string) - exported font sizeargs.fontStyle("normal"|"italic"|"bold") - exported font styleargs.format(string) - target format passed to DayPilot.Scheduler.exportAs() (read-only); available since 2025.1.6393args.horizontalAlignment("left"|"center"|"right") - horizontal text alignmentargs.verticalAlignment("top"|"center"|"bottom") - vertical text alignmentargs.minHeight(number) - minimum row height during Excel export (available since 2026.1.6814)
args.columns contains the exported visible row-header cells, including the first cell; it excludes column titles.
Column properties (args.columns[x]):
areas(DayPilot.AreaData[]): active areas for this exported cellbackColor(string) - column background colorfontColor(string) - column font colorfontFamily(string) - column font familyfontSize(string) - column font sizefontStyle(string) - column font stylehorizontalAlignment("left"|"center"|"right") - horizontal text alignmentverticalAlignment("top"|"center"|"bottom") - vertical text alignmenttext(string) - exported column text
Notes
Use this event when the exported row header should differ from the browser view, for example when the on-screen row header contains HTML but the export should use plain text.
The handler runs for image export, Excel export, and direct printing. Check args.format if you need to branch on the target format selected using DayPilot.Scheduler.exportAs().
Active Areas in Image Export
For PNG, JPEG and SVG export, args.areas contains copies of the active-area descriptors prepared for this item. Replace it or assign [] to change only the exported areas. The export does not call an area’s onAfterRender DOM callback. Custom HTML remains outside the supported image-export representation.
Top-level args.areas addresses the first cell, or a merged parent header. Replacing it takes precedence over args.columns[0].areas. To suppress every row-header area, clear both the top-level array and each column array.
args.areas = [];
args.columns.forEach(column => { column.areas = []; });Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onBeforeRowHeaderExport: (args) => {
args.text = args.row.name;
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onBeforeRowHeaderExport: (args) => {
args.text = args.row.name;
},
// ...
};React
<DayPilotScheduler
onBeforeRowHeaderExport={onBeforeRowHeaderExport}
/>const onBeforeRowHeaderExport = (args) => {
args.text = args.row.name;
};Vue
<DayPilotScheduler
:onBeforeRowHeaderExport="onBeforeRowHeaderExport"
/>const onBeforeRowHeaderExport = (args) => {
args.text = args.row.name;
};See Also
Client-Side Export [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot