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.
Declaration
DayPilot.Scheduler.onBeforeCornerExport(args)Parameters
args.control(DayPilot.Scheduler) - control instance (available since version 2024.4.6271)args.backColor(string) - background colorargs.fontSize(string) - font sizeargs.fontFamily(string) - font familyargs.fontStyle("normal"|"bold") - font styleargs.fontColor(string) - font colorargs.format(string) - target format set using exportAs() (read-only, available since version 2025.1.6393)args.horizontalAlignment("left"|"center"|"right") - horizontal text alignmentargs.text(string) - exported textargs.verticalAlignment("top"|"center"|"bottom") - vertical text alignment
Notes
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().
Examples
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");
};See Also
Upper-Left Corner [doc.daypilot.org]
DayPilot.Scheduler.onBeforeCornerRender
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot