This is a migrated thread and some comments may be shown as answers.

Kendo PDF Export

1 Answer 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
supriya
Top achievements
Rank 1
supriya asked on 16 Oct 2017, 09:17 AM

Hi 

I am using kendo to export div into pdf

Below is the code

    var draw = kendo.drawing;

    draw.drawDOM($("#divexport"))
     .then(function (root) {
         return draw.exportPDF(root, {
             pdf: {
                 date:new Date("MM/dd/yyy")
             },
             timezone: "Etc/UTC"
         });
     })
  .done(function (data) {
      kendo.saveAs({
          dataURI: data,
          fileName: fileName,
          proxyURL: "api/Value/Post/",
          forceProxy: true
   
      });

   Everything is working properly, however i want all the date control in "MM/dd/yyyy" format but it giving me date yyyy/mm/dd which is default input type date     format..

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 17 Oct 2017, 02:51 PM
Hello Supriya,

On the following Dojo example you can find a simple DatePicker implementation, where a similar scenario to the one described is demonstrated (formatting DatePicker value). With it, the DatePicker value is formatted as required ("MM/dd/yyy"). 

You can try and use the DatPicker's format option as shown in the above Dojo to change the format for all DatePicker widgets in the export container. Then, the values should be properly exported in the correct format.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
supriya
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or