locale property of DatePicker not working

Hi,

I am defining a ejDatePicker element as this:

HTML:

<div class="form-group">
         @Html.Label("FechaDesde", "Fecha desde:", new { @class = "control-label col-md-6" })
         <div>
                <input type="text" id="FechaDesde" />
         </div>
</div>

SCRIPT:

$("#FechaDesde").ejDatePicker({
                        dateFormat: "yyyy-MM-dd",
                        locale: "es-CO",
                        buttonText: "Hoy",
                        watermarkText: "Seleccione fecha"
                    });

However, the resulting control has months names in english language but, I need them in spanish. As you can see, I use locale: "es-CO", so I don`t know what is wrong. You can see the control in the image attached.

I will appreciate your help.
Kind regards,

Juan J.


Attachment: DatePicker_467d938e.zip

3 Replies

PK Prem Kumar Madhan Raj Syncfusion Team July 26, 2018 01:37 PM UTC

Hi Juan, 

Thanks for contacting Syncfusion Support. 

We have checked with your query and suspect that the month names in the control may not be changed to Spanish because of not referring the corresponding culture file in your application. In order to localize the component to any culture, the corresponding culture file (in your case es-CO) must be referred in your application. So, please ensure that the ej.culture.es-CO.min.js is referred in your application to change the month names in the calendar. 

To know more about globalizing the DatePicker component, please check the below documentation link. 



For your convenience, we have also attached a simple JS playground sample in the below link. Please check it. 



Regards, 

Prem Kumar M 



JJ Juan Jose Uribe July 26, 2018 02:42 PM UTC

Yes, you are right, I did not have the reference.
Now, with the reference, is working right.

Thanks so much.

Juan J


PK Prem Kumar Madhan Raj Syncfusion Team July 27, 2018 07:08 AM UTC

Hi Juan, 
  
Most Welcome. Please let us know if you need further assistance. 
  
Regards, 
  
Prem Kumar M 


Loader.
Up arrow icon