We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Localization for charts

I'm having troubles getting dates to work properly as I'm from europe all my dates are stored in a DB as dd/MM/YY
but when using these controls they expect en-US so june first becomes 6th of january.

I've read the documentation but don't understand how I can use Javascript to change the date formats.

1 Reply

JR John Rajaram Syncfusion Team January 23, 2015 07:12 AM UTC

Hi Alexander,

Thank you for using Syncfusion products.

We would like to inform you that, you can change the date format based on the Localization by using the DateFormatproperty.

Please refer the below code snippets for more details.

Code snippets:

@(Html.EJ().Gantt("Gantt").

   //...

   .DateFormat("dd/MM/yyyy")

   .Datasource(ViewBag.dataSource)

 )

@(Html.EJ().ScriptManager())

 

And also please refer the following online documentation link for more information about the various properties in Gantt control.

Link:  http://staging.syncfusion.com:96/ejGantt.html#dateFormat

We have also prepared a sample based on this with date format as “dd/MM/yyyy” and you can find the sample under the following location.

Sample Location: http://www.syncfusion.com/downloads/support/directtrac/118034/MVC09NewSampleDateFormat-1216954247.zip

Please let us know if you require further assistance on this.

Regards,
John. R



Loader.
Live Chat Icon For mobile
Up arrow icon