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

How to Translate Today footer in DatePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

124294 May 30,2016 12:31 PM UTC Jun 1,2016 03:57 AM UTC ASP.NET MVC 3
loading
Tags: DatePicker
Geoffroy PERRIER
Asked On May 30, 2016 12:31 PM UTC

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

Francis Paul Antony Raj [Syncfusion]
Replied On 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 


Geoffroy PERRIER
Replied On May 31, 2016 01:10 PM UTC

Thank you ! It work as expected 

Francis Paul Antony Raj [Syncfusion]
Replied On 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 


CONFIRMATION

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

or the page will be automatically redirected to 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

;