Fired during image export. Allows you to customize the column headers in the exported image.
Declaration
DayPilot.Calendar.onBeforeHeaderExport(args);
Parameters
- args.text (string) - exported text (by default set to customized HTML)
- args.backColor (string) - background color of the time header cell
- args.horizontalAlignment ("left" | "center" | "right") - text alignment (default value is "center")
- args.fontSize
- args.fontFamily
- args.fontStyle
- args.fontColor
- args.header.name - column name (from column[].name in resources view)
- args.header.id - column id (if specified, in resources view)
- args.header.level - header level (integer, zero-based index)
- args.header.start - start date (DayPilot.Date object)
- args.header.html - customized HTML (string)
Example
Uses the original header text instead of customized HTML:
dp.onBeforeHeaderExport = function(args) {
args.text = args.header.name;
};