extendDayjs()
Extend the dayjs library with plugins
const cal = new CalHeatmap();
cal.extend(PluginFunc);
The built-in dayjs is already shipped with some plugins, see the DateHelper for the list of plugins.
Arguments:
plugin
: ADayjs Plugin
Usage
Example with the BuddhistEra plugin
Inject the dayjs plugin in your page <head>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/buddhistEra.js"></script>
Extend dayjs with the plugin, before any paint()
call
const cal = new CalHeatmap();
cal.extendDayjs(window.dayjs_plugin_buddhistEra);