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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dateformat in datepicker not working

Thread ID:





120751 Oct 10,2015 03:03 PM UTC Oct 14,2015 05:13 PM UTC ASP.NET MVC 3
Tags: Button
Roimer Machacón Otero
Asked On October 10, 2015 03:03 PM UTC

Hi, we're using datepicker in our application and we´re need that the date have this format MM/dd/YYYY. Now modifying the dateformat put this:

<ej:DatePicker runat="server" ID="txtFechaInicial" DateFormat="MM/dd/yyyy"></ej:DatePicker>

But when we´re read the value of this datepicker (txtFechaInicial.Value.Substring(0, 10)), for example the value appear "2015-01-01" and with the format "MM/dd/YYYY" would be "01-01-2015".

Now exist a form for put in the locale es-Es the calendar in this language because for default the datepicker appear in english anf we're need in spanish, in a js we've a locale es-Es but need the data for the calendar.

Attached image when show this information

Attachment: datepicker_57607264.rar

Francis Paul Antony Raj [Syncfusion]
Replied On October 12, 2015 10:09 AM UTC

Hi Roimer,
Thanks for contacting Syncfusion support.
We have analyzed your query. You can customize our date picker control to Spanish language with the help of property “locale”. For that you need to include the corresponding culture script file in your application. We have DateFormat property by which the selected value will be displayed in the specified dateformat. Please refer the following code snippet.

<ej:DatePicker ID="dateES" Locale="es-ES" ButtonText="Este Dia" DateFormat="MM/dd/yyyy" runat="server"></ej:DatePicker>

For your convenience, we have attached a sample based on your code, please check it.


To know more about the list of properties, methods, and events available in Autocomplete, please check the following link.



Francis Paul A

Roimer Machacón Otero
Replied On October 13, 2015 02:22 PM UTC

Hi, thanks for the answer, the locale es-ES work good but the form of the value not corresponding with the dateformat put for the datepicker DateFormat="MM/dd/yyyy", 
persist the form YYYYY-mm-dd.

Attached image with this error with the definition of the datepicker and with the value after of select a value.

Attachment: datepicker_error_4957ed9e.rar

Francis Paul Antony Raj [Syncfusion]
Replied On October 14, 2015 05:13 PM UTC

Hi Roimer,

Thanks for contacting Syncfusion support.

We are unable to reproduce the reported issue at our side. Based on your query, we have prepared a sample, please check it.


In the sample the date value obtained based on the specified DateFormat is shown in the serverside event. If still you face any difficulties, please provide more details about your issue or please revert back the provided sample based on your application along with the replication procedure to reproduce the issue at our end. This would be helpful for us to analyze and provide an exact solution at the earliest.


Francis Paul A


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon