The monthly calendar supports direct printing of the current view.

JavaScript

Example

<div id="dp"></div>

<div class="space">
  Format:
  <select id="format">
    <option value="svg">SVG</option>
    <option value="png">PNG</option>
  </select>
</div>

<div class="space">
  <a href="#" id="print-button">Print</a>
</div>

<script>
  const dp = new DayPilot.Month("dp");
  // ... config
  dp.init();

  const app = {
    elements: {
      format: document.querySelector("#format"),
      print: document.querySelector("#print-button")
    },
    init() {
      app.elements.print.addEventListener("click", ev => {
        ev.preventDefault();

        const format = app.elements.format.value; // "svg" | "png"
        dp.exportAs(format).print();
      });
    }
  };

  app.init();
</script>