The onBeforeCellExport event handler fires during image export and lets you set a custom background color for the exported cell.
Declaration
DayPilot.Calendar.onBeforeCellExport(args)Parameters
args.cell- exported grid cell object (read-only)args.backColor(string) - exported cell background color
Notes
The args object is the same instance that is used in onBeforeCellRender, which is called right before onBeforeCellExport.
Examples
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";
};See Also
DayPilot.Calendar.onBeforeCellRender
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot