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.
Declaration
DayPilot.Scheduler.onBeforeCornerRender(args)Parameters
args.backColor(string) - corner background colorargs.areas(array) - custom active areas (available since 2020.2.4372)args.control(DayPilot.Scheduler) - control instanceargs.horizontalAlignment("left"|"center"|"right") - horizontal content alignmentargs.html(string) - custom HTMLargs.text(string) - custom textargs.verticalAlignment("top"|"center"|"bottom") - vertical content alignment
Notes
In the browser, args.html overrides args.text. During client-side export, args.text overrides args.html.
Examples
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");
};See Also
Upper-Left Corner [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot