The onBeforeCornerExport event handler fires during Excel and image export (JPEG, PNG, SVG) and direct printing. It lets you customize the appearance of the upper-left corner of the JavaScript Scheduler.
Available since version 2021.4.5145.
DayPilot.Scheduler.onBeforeCornerExport(args)args.control (DayPilot.Scheduler) - control instance (available since version 2024.4.6271)
args.backColor (string) - background color
args.fontSize (string) - font size
args.fontFamily (string) - font family
args.fontStyle ("normal" | "bold") - font style
args.fontColor (string) - font color
args.format (string) - target format set using exportAs() (read-only, available since version 2025.1.6393)
args.horizontalAlignment ("left" | "center" | "right") - horizontal text alignment
args.text (string) - exported text
args.verticalAlignment ("top" | "center" | "bottom") - vertical text alignment
Use this event to customize the exported corner label independently of browser rendering. The target output format is available in args.format when export is started using exportAs().
JavaScript
const scheduler = new DayPilot.Scheduler("dp", {
onBeforeCornerExport: (args) => {
args.text = args.control.startDate.toString("yyyy");
},
// ...
});
scheduler.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onBeforeCornerExport: (args) => {
args.text = args.control.startDate.toString("yyyy");
},
// ...
};React
<DayPilotScheduler
onBeforeCornerExport={onBeforeCornerExport}
{/* ... */}
/>const onBeforeCornerExport = (args) => {
args.text = args.control.startDate.toString("yyyy");
};Vue
<DayPilotScheduler
@beforeCornerExport="onBeforeCornerExport"
<!-- ... -->
/>const onBeforeCornerExport = (args) => {
args.text = args.control.startDate.toString("yyyy");
};Upper-Left Corner [doc.daypilot.org]