The onBeforeTimeHeaderExport event is fired during image export (JPEG, PNG, SVG) and direct printing. It allows you to provide alternative text for the JavaScript Scheduler time header (image export doesn't support HTML).
DayPilot.Scheduler.onBeforeTimeHeaderExport(args);
args.backColor
(string) - background color of the time header cell (since 8.3.2737)
args.fontColor
(since 2020.3.4645)
args.fontFamily
(since 2020.3.4645)
args.fontSize
(since 2020.3.4645)
args.fontStyle
("normal" | "italic" | "bold") (since 2020.3.4645)
args.format
(string) - the target format set using exportAs(), readonly - since version 2025.1.6393
args.header.start
- cell start (DayPilot.Date)
args.header.end
- cell end (DayPilot.Date)
args.header.level
- header level (integer, zero-based index)
args.header.text
- default text (string)
args.header.html
- customized HTML (string)
args.text
(string) - exported text (by default set to customized HTML)
Use the original cell text instead of HTML.
Scheduler config:
onBeforeTimeHeaderExport: (args) => {
args.text = args.header.text;
};