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.row(DayPilot.Row) - exported rowargs.columns(array) - additional exported 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)
Column properties (args.columns[x]):
backColor(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().
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
@beforeRowHeaderExport="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