DayPilot.Scheduler.onBeforeTimeHeaderRender

The onBeforeTimeHeaderRender event fires before a Scheduler time header cell is rendered. You can use it to customize the time header cells.

During image export, you can further customize the time headers using onBeforeTimeHeaderExport event.

Declaration

DayPilot.Scheduler.onBeforeTimeHeaderRender(args)

Parameters

  • args.header.areas (array) - active areas (see JavaScript Scheduler Time Header Customization tutorial)

  • args.header.backColor (string)

  • args.header.cssClass

  • args.header.end (DayPilot.Date, read-only)

  • args.header.text (string) - if args.header.html is null, this text will be HTML-encoded and displayed in the header

  • args.header.html (string) - overrides the default text with raw HTML (by default the value is null)

  • args.header.level (read-only; zero-based row index)

  • args.header.start (DayPilot.Date, read-only)

  • args.header.toolTip (string)

Example

onBeforeTimeHeaderRender: (args) => {
  if (args.header.start.getDayOfWeek() === 6) {
    args.header.html = "Sat";
  }
}