search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Export a Time Range example from Documentation does not work.

Asked by Steve
6 years ago.

I am looking at the documentation here:

https://code.daypilot.org/73551/html5-scheduler-pdf-export-javascript

This piece of code appears under the heading: Export a Time Range.

var image = dp.exportAs("jpeg"

This fails with an error message: TypeError: exportAs is not a function.

What is the correct method please?

Answer posted by Dan Letecky [DayPilot]
6 years ago.

The exportAs() method is available in the Scheduler (DayPilot.Scheduler object) since version 8.2.2117.

Note that it's not available for the other controls yet (Calendar, Month, Gantt...).

Let me know if it still doesn't work.

Comment posted by Steve
6 years ago.

Thank you Dan. Using .scheduler.exportAs("jpeg" appeared to work, but there is no clue as to where the exported data will end up.

Comment posted by Dan Letecky [DayPilot]
6 years ago.

The exportAs() method returns an Export object. You need to call one of its methods to get the result data, e.g.:

  • download()
  • print()
  • toBlob()

etc.

See also:
https://doc.daypilot.org/scheduler/client-side-jpeg-export/

Comment posted by Steve
6 years ago.

Forget that last comment. Was able to download the image once it had been created.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.