Error in the format of a Date data type

I was currently working on exporting to pdf, excel, csv, print, almost all of them work perfectly for me, except for the pdf export, currently my column is like this.

<e-grid-column field="FechaCreacion" headerText="FechaCreacion" format="dd-MM-yyyy" type="date"></e-grid-column>

What happens is that the program simply gets stuck and the only solution is to close everything; it doesn't even allow me to debug or view the devtools in my browser. The only thing is that if I hide the column, it does export to PDF, or if I leave the line of code like this.

<e-grid-column field="FechaCreacion" headerText="FechaCreacion" type="date"></e-grid-column>

It will also work without any problems, and I would like to know how I could solve this error in the format.


1 Reply 1 reply marked as answer

SR Sivaranjani Rajasekaran Syncfusion Team May 29, 2025 11:26 AM UTC

Hi José Rodolfo Araya Aragón,

Greetings from Syncfusion support!

This issue is related to how custom date formats are parsed during the PDF export process. When using the format property, the export module may fail to parse the custom format correctly, leading to application freezing.

To resolve this, we recommend displaying the date in the desired format in the UI using the customFormat property. When you apply a default format, the Grid automatically parses and exports the date correctly. However, when using custom formatting, it's important to use the customFormat property so that the Grid can handle the parsing properly during export.

We have prepared a sample demonstrating how to use custom formatting. This approach ensures the Grid displays the date correctly while also allowing PDF export to work without issues

By using this you can resolve the issue. So we suggest to sing the custom formating to avoid the issue.

 

 

Code Example : 

 

 <e-grid-column
          field="OrderDate"
          headerText="FechaCreacion"
          customFormat="@(new { type ="date", format="dd-MM-yyyy" })"
          type="date"
          textAlign="Right" width="140"></e-grid-column>

       

 

Screenshot : 

 


 

Please let us know if you need any further assistance.

 

Regards,

Sivaranjani.


Marked as answer
Loader.
Up arrow icon