DayPilot.Calendar.onBeforeTimeHeaderRender

The onBeforeTimeHeaderRender event handler lets you customize the row headers in the JavaScript Calendar component.

Declaration

DayPilot.Calendar.onBeforeTimeHeaderRender(args)

Parameters

  • args.header.areas - active areas that will be displayed in the time header

  • args.header.hours (number; read-only) - the hour part of the time (e.g. 13)

  • args.header.html - the HTML that will be displayed in the time header

  • args.header.minutes (number; read-only) - the minute part of the time (e.g. 30)

  • args.header.start (string; read-only) - the time as string (e.g. "13:30")

  • args.header.text - the text that will be used instead of HTML during Calendar image export (since 2022.3.5376)

  • args.header.time (DayPilot.Duration object; read-only) - available since 2018.4.3474

Example

Calendar config:

{
  onBeforeTimeHeaderRender: (args) => {
    if (args.header.hours === 12) {
      args.header.html = "noon";
    }
  },
  // ...
}