The onBeforeCellExport event handler fires during image export and lets you set a custom background color for the exported cell.
DayPilot.Calendar.onBeforeCellExport(args)args.cell - exported grid cell object (read-only)
args.backColor (string) - exported cell background color
The args object is the same instance that is used in onBeforeCellRender, which is called right before onBeforeCellExport.
JavaScript
const calendar = new DayPilot.Calendar("dp", {
onBeforeCellExport: (args) => {
args.backColor = "white";
},
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
onBeforeCellExport: (args) => {
args.backColor = "white";
},
// ...
};React
<DayPilotCalendar
onBeforeCellExport={onBeforeCellExport}
{/* ... */}
/>const onBeforeCellExport = (args) => {
args.backColor = "white";
};Vue
<DayPilotCalendar
@beforeCellExport="onBeforeCellExport"
<!-- ... -->
/>const onBeforeCellExport = (args) => {
args.backColor = "white";
};