paint()
Paint the calendar using the given Options and Plugins.
const cal = new CalHeatmap();
cal.paint(options: Options, plugins? PluginDefinition[] | PluginDefinition): Promise<unknown>;
This is the core method, used to setup and paint the calendar.
Arguments
options: AnOptionsobject.plugins: An array of Plugin Definition definition.
Return
- A Promise, that will resolve once the calendar is painted, and filled with data.
tip
The calendar can be updated dynamically by calling this method with new Options.
Usage
With custom options
const cal = new CalHeatmap();
cal.paint({
range: 1,
date: { start: new Date(2020, 0, 1) },
});
With plugins
const cal = new CalHeatmap();
cal.paint({}, [[Timezone, { timezone: 'Europe/Paris' }]]);