DayPilot.Scheduler.onBeforeRowHeaderExport

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.row (DayPilot.Row) - exported row

  • args.columns (array) - additional exported 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)

Column properties (args.columns[x]):

  • 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().

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
  @beforeRowHeaderExport="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:

LitePro
DayPilot for JavaScript