The onBeforeCornerRender event handler is called during update() and lets you customize the content of the upper-left corner of the Gantt chart component.
Available since 2020.2.4376.
Declaration
DayPilot.Gantt.onBeforeCornerRender(args)Parameters
args.control(DayPilot.Gantt) - control instance.args.html(string) - custom HTML.args.areas(array) - custom active areas.
Notes
Use args.html to replace the rendered corner content and args.areas to attach custom active areas to the corner.
Examples
JavaScript
const gantt = new DayPilot.Gantt("dp", {
onBeforeCornerRender: (args) => {
args.html = args.control.visibleStart().toString("yyyy");
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
onBeforeCornerRender: args => {
args.html = args.control.visibleStart().toString("yyyy");
},
// ...
};React
<DayPilotGantt
onBeforeCornerRender={onBeforeCornerRender}
{/* ... */}
/>const onBeforeCornerRender = (args) => {
args.html = args.control.visibleStart().toString("yyyy");
};Vue
<DayPilotGantt
@beforeCornerRender="onBeforeCornerRender"
<!-- ... -->
/>const onBeforeCornerRender = (args) => {
args.html = args.control.visibleStart().toString("yyyy");
};See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot