The onBeforeRowHeaderExport event handler fires during export (JPEG, PNG, SVG, Excel) and direct printing. It lets you customize the JavaScript Scheduler row header content and appearance in the exported output.

Declaration

DayPilot.Scheduler.onBeforeRowHeaderExport(args)

Parameters

  • args.areas (DayPilot.AreaData[]): active areas for image export

  • args.row (DayPilot.Row) - exported row

  • args.columns (array) - exported visible row header columns; available since 2021.4.5143; in earlier versions this array was available as args.row.columns

  • args.text (string) - exported text

  • args.backColor (string) - exported background color

  • args.borderColor (string) - exported border color

  • args.fontColor (string) - exported font color

  • args.fontFamily (string) - exported font family

  • args.fontSize (string) - exported font size

  • args.fontStyle ("normal" | "italic" | "bold") - exported font style

  • args.format (string) - target format passed to DayPilot.Scheduler.exportAs() (read-only); available since 2025.1.6393

  • args.horizontalAlignment ("left" | "center" | "right") - horizontal text alignment

  • args.verticalAlignment ("top" | "center" | "bottom") - vertical text alignment

  • args.minHeight (number) - minimum row height during Excel export (available since 2026.1.6814)

args.columns contains the exported visible row-header cells, including the first cell; it excludes column titles.

Column properties (args.columns[x]):

  • areas (DayPilot.AreaData[]): active areas for this exported cell

  • backColor (string) - column background color

  • fontColor (string) - column font color

  • fontFamily (string) - column font family

  • fontSize (string) - column font size

  • fontStyle (string) - column font style

  • horizontalAlignment ("left" | "center" | "right") - horizontal text alignment

  • verticalAlignment ("top" | "center" | "bottom") - vertical text alignment

  • text (string) - exported column text

Notes

Use this event when the exported row header should differ from the browser view, for example when the on-screen row header contains HTML but the export should use plain text.

The handler runs for image export, Excel export, and direct printing. Check args.format if you need to branch on the target format selected using DayPilot.Scheduler.exportAs().

Active Areas in Image Export

For PNG, JPEG and SVG export, args.areas contains copies of the active-area descriptors prepared for this item. Replace it or assign [] to change only the exported areas. The export does not call an area’s onAfterRender DOM callback. Custom HTML remains outside the supported image-export representation.

Top-level args.areas addresses the first cell, or a merged parent header. Replacing it takes precedence over args.columns[0].areas. To suppress every row-header area, clear both the top-level array and each column array.

args.areas = [];
args.columns.forEach(column => { column.areas = []; });

Examples

JavaScript

const dp = new DayPilot.Scheduler("dp", {
  onBeforeRowHeaderExport: (args) => {
    args.text = args.row.name;
  },
  // ...
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  onBeforeRowHeaderExport: (args) => {
    args.text = args.row.name;
  },
  // ...
};

React

<DayPilotScheduler
  onBeforeRowHeaderExport={onBeforeRowHeaderExport}
/>
const onBeforeRowHeaderExport = (args) => {
  args.text = args.row.name;
};

Vue

<DayPilotScheduler
  :onBeforeRowHeaderExport="onBeforeRowHeaderExport"
/>
const onBeforeRowHeaderExport = (args) => {
  args.text = args.row.name;
};

See Also

Client-Side Export [doc.daypilot.org]

DayPilot.Scheduler.exportAs()

DayPilot.Row Class

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript