Print

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
titleRenderer: function | String

The 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.

ParameterTypeDescription
sourceCalendarView

The view which triggered the event.

Returns: String
wysiwyg: Boolean= false

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

Prints the current active view of the Calendar

Events

2

Fires on the owning Calendar before print starts. Return false to cancel the print.

// Adding a listener using the "on" method
print.on('beforePrint', ({ config }) => {

});
ParameterTypeDescription
configObject

Print config

Fires when print has finished

// Adding a listener using the "on" method
print.on('print', ({  }) => {

});

Event handlers

2

Called on the owning Calendar before print starts. Return false to cancel the print.

new Print({
    onBeforePrint({ config }) {

    }
});
ParameterTypeDescription
configObject

Print config

Called when print has finished

new Print({
    onPrint({  }) {

    }
});