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

How to Translate Today footer in DatePicker

Hi,
I'm currently testing the MVC controls, for the DatePicker I've got it well translated for the month  but the footer is not translated.

I didn't find where I can specify the "Today" value localized.

My code:
 @Html.EJ().DatePicker(ControlId).Value(CDate("02/10/2016")).ShowOtherMonths(True).Locale("fr-FR").Width("100%").WatermarkText("")
 @Html.EJ().DatePicker(ControlId).Value(CDate("02/10/2016")).ShowOtherMonths(True).Locale("es-ES").Width("100%").WatermarkText("")

I'm attaching a screenshot  picture may speak better than me :)



Thank you 

Attachment: FrenchSpanish_40532e58.zip

3 Replies

FP Francis Paul Antony Raj Syncfusion Team May 31, 2016 12:52 PM UTC

Hi Geoffroy, 
 
Thanks for contacting Syncfusion support. 
 
We would like to let you know that, by default the EJMVC DatePicker footer has “Today” as Button Text, you can change this value using ‘ButtonText’ property. 
Based on culture specific, only date gets localized but by changing the watermark text and button text with the help of ‘watermarkText’ and ‘buttonText’ properties, you can completely localize the DatePicker UI. Please refer to the below code snippet. 
 
[cshtml] 
@Html.EJ().DatePicker("datepick").Value(System.DateTime.Now).WatermarkText("enter the date value").ButtonText("current date").Locale("en-US") 
 
[script] 
var dateObj = $("#datepick").ejDatePicker('instance'); 
 
    //condition to check Spanish culture and change watermark and button text using dateObj. 
    if (ej.cultureObject.name == "es-ES") { 
        dateObj.option({ buttonText: "hoy", watermarkText: "seleccione fecha" }) 
    } 
 
    //condition to check French culture and change watermark and button text using dateObj. 
    if (ej.cultureObject.name == "fr-FR") { 
        dateObj.option({ buttonText: "aujourd'hui", watermarkText: "sélectionnez la date" }) 
    } 
 
For more information, please refer to the below link, 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Francis Paul A 



GP Geoffroy PERRIER May 31, 2016 01:10 PM UTC

Thank you ! It work as expected 


FP Francis Paul Antony Raj Syncfusion Team June 1, 2016 03:57 AM UTC

Hi Geoffroy, 
 
Thanks for your update. 
Please let us know, if you need any further assistance. 
 
Regards, 
Francis Paul A 


Loader.
Live Chat Icon For mobile
Up arrow icon