The onBeforeCornerRender event handler fires during DayPilot.Scheduler.update() and lets you customize the content of the upper-left corner of the JavaScript Scheduler component.
Available since 2019.3.3903.
DayPilot.Scheduler.onBeforeCornerRender(args)args.backColor (string) - corner background color
args.areas (array) - custom active areas (available since 2020.2.4372)
args.control (DayPilot.Scheduler) - control instance
args.horizontalAlignment ("left" | "center" | "right") - horizontal content alignment
args.html (string) - custom HTML
args.text (string) - custom text
args.verticalAlignment ("top" | "center" | "bottom") - vertical content alignment
In the browser, args.html overrides args.text. During client-side export, args.text overrides args.html.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onBeforeCornerRender: (args) => {
args.html = args.control.visibleStart().toString("yyyy");
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onBeforeCornerRender: (args) => {
args.html = args.control.visibleStart().toString("yyyy");
},
// ...
};React
<DayPilotScheduler
onBeforeCornerRender={onBeforeCornerRender}
{/* ... */}
/>const onBeforeCornerRender = (args) => {
args.html = args.control.visibleStart().toString("yyyy");
};Vue
<DayPilotScheduler
@beforeCornerRender="onBeforeCornerRender"
<!-- ... -->
/>const onBeforeCornerRender = (args) => {
args.html = args.control.visibleStart().toString("yyyy");
};Upper-Left Corner [doc.daypilot.org]