This feature enables printing of the current Calendar mode.
Usage
const calendar = new Calendar({
features : {
print : true
}
});
// Simple print
calendar.print();
This feature is disabled by default.
Configs
2
Configs
2The function to use to create the <title> element for the print document. Defaults to using the descriptionRenderer of the active view. Note that this does not process HTML source.
| Parameter | Type | Description |
|---|---|---|
source | CalendarView | The view which triggered the event. |
By default, a MonthView is rendered with the week rows shrinkwrapping their event content. That is, rows with no events are small, and rows containing events are expanded to make all events visible.
To duplicate the on-screen appearance in terms of week row heights where empty rows
are flexed to consume an equal amount of height, configure this as true.
Functions
1
Functions
1Prints the current active view of the Calendar
Events
2
Events
2Fires on the owning Calendar before print starts. Return false to cancel the print.
// Adding a listener using the "on" method
print.on('beforePrint', ({ config }) => {
});| Parameter | Type | Description |
|---|---|---|
config | Object | Print config |
Fires when print has finished
// Adding a listener using the "on" method
print.on('print', ({ }) => {
});Event handlers
2
Event handlers
2Called on the owning Calendar before print starts. Return false to cancel the print.
new Print({
onBeforePrint({ config }) {
}
});| Parameter | Type | Description |
|---|---|---|
config | Object | Print config |