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
close icon

DatePicker Locale

Hi, I just noticed that in the Service Pack version of the DatePicker (and DatePickerFor)

             @Html.EJ().DatePickerFor(a => a.Project.StartDate, (Syncfusion.JavaScript.Models.DatePickerProperties)ViewBag.PropsDp)
The locale and DateFormat is Ignored.
I set the locale to "en-GB" but the format is Always "MM/dd/yyyy"
This behavior happens with whe normal and the Patched version of scripts you have provided me.
With the old version of scripts the problem didn't appear.
As noted on other post, if I don't use the "setModel" method, the DatePicker does not initialize the value.even outside the Grid Inline Edit Form.

Hope there is a workaround.

    Thanks in advance

    Andrea Perazzolo 

1 Reply

KC Kasithangam C Syncfusion Team February 20, 2015 12:59 PM UTC

Hi Andrea,

Query: Service Pack version of the DatePicker (and DatePickerFor) locale and DateFormat is ignored and DatePicker doesn’t initialize the value

We have analyzed your query and we are able to reproduce the above reported issue. We have confirmed the issue “dateFormat is not changed while set en-GB in locale and DatePicker doesn’t initialize the value”. We have logged a defect report for this issue. A support incident to track the status of this issue has been created under your account. Please log on to our support website to check for further updates.


Currently for a workaround solution, we need to set the values for “DatePicker” and “DatePickerFor” using setModel option only. Please find the below code,


    $(function () {

        var datePick = $("#datepick").data("ejDatePicker");

         var DateFor = $("#datepicker1").data("ejDatePicker");

        datePick.option("value", new Date());

         DateFor.option("value", new Date());



Also we have showcased this functionality in the below workaround solution. Please find the sample under the following location,

Sample : DatePicker Sample

Please let us know if you have further concern.



Live Chat Icon For mobile
Up arrow icon