- Home
- Forum
- ASP.NET MVC
- How to Translate Today footer in DatePicker
How to Translate Today footer in DatePicker
Hi,

Attachment: FrenchSpanish_40532e58.zip
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
SIGN IN To post a reply.
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,
For demo sample, refer to http://mvc.syncfusion.com/demos/web/datepicker/localization
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
GP Geoffroy PERRIER
- May 30, 2016 12:31 PM UTC
- Jun 1, 2016 03:57 AM UTC