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.
DayPilot.Gantt.onBeforeCornerRender(args)args.control (DayPilot.Gantt) - control instance.
args.html (string) - custom HTML.
args.areas (array) - custom active areas.
Use args.html to replace the rendered corner content and args.areas to attach custom active areas to the corner.
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");
};