Skip to main content Link Menu Expand (external link) Document Search Copy Copied

paint()

Paint the calendar using the given Options and Plugins.

const cal = new CalHeatmap();
cal.paint(options: Options, plugins? PluginDefinition[] | PluginDefinition);

This is the core method, used to setup and paint the calendar.

Arguments:

Return

  • A Promise, that will resolve once the calendar is painted, and filled with data.

The calendar can be updated dynamically by calling this method with new Options.


Usage

Example with random options

const cal = new CalHeatmap();
cal.paint({
  range: 1,
  date: { start: new Date(2020, 0, 1) },
});

Example with no options, and random plugins

const cal = new CalHeatmap();
cal.paint({}, [[Timezone, { timezone: 'Europe/Paris' }]]);