DayPilot.Scheduler.onBeforeCornerRender

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 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

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

DayPilot.Scheduler.update()

Upper-Left Corner [doc.daypilot.org]

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript