You can export the monthly calendar using the exportAs() method on the client side.
Supported export formats:
-
JPEG
-
PNG
-
SVG
JavaScript
<div id="month"></div>
<div>
<button id="download-button">Download</button>
</div>
<script>
const month = new DayPilot.Month("month");
// ... config
month.init();
const app = {
elements: {
download: document.querySelector("#download-button")
},
init() {
app.elements.download.addEventListener("click", ev => {
ev.preventDefault();
month.exportAs("jpeg").download();
});
}
};
app.init();
</script>
DayPilot