The exportAs() method exports the Scheduler in the specified image format.


DayPilot.Scheduler.exportAs(format[, options]);


  • format: "svg" | "png" | "jpeg"
  • options.area - specifies the exported area ("viewport", "full" or "range"); if not specified, "viewport" will be used
  • options.dateFrom - start date (applies only to area: "range")
  • options.dateTo - end date (applies only to area: "range")
  • options.resourceFrom - start resource (applies only to area: "range")
  • options.resourceTo - end resource (applies only to area: "range")
  • options.quality - quality of the output JPEG image (applies only to format: "jpeg"); if not specified, 0.92 will be used
  • options.scale - sets the scale of the output; if not specified, 1 will be used (to magnify the output to 200%, use a value of 2)

Return Value

A DayPilot.Export object that provides the following methods:

  • toElement() - returns DOM element with the image (<svg> or <img>)
  • toHtml() - returns DOM element as HTML
  • toDataUri() - returns a dataURI string (SVG or image data)
  • toBlob() - returns a Blob object
  • download(filename) - forces download of the image
  • print()prints the exported image using the browser print dialog