This is a migrated thread and some comments may be shown as answers.

Localisation date format

3 Answers 397 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kevin Vanhove
Top achievements
Rank 1
Kevin Vanhove asked on 01 Nov 2011, 02:59 PM
Hi,

Is there a way to set the date in the footer to this format : 12 december 2011? For the months, how can i set in in my language?

Thx,

Kevin,

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 03 Nov 2011, 02:39 PM
Hello Kevin,

 
Currently, the datepicker widget does not expose an easy way to modify the footer or the cell content of the popup calendar. Nevertheless you can achieve your goal by directly modifying the calendar footer:

var dp = $("#datepicker").kendoDatePicker().data("kendoDatePicker");
 
dp.dateView
  .calendar.element
  .append('<div class="k-footer"><a href="#" class="k-link k-nav-today">' + kendo.toString(new Date(), "dd MMMM yyyy") + "</a></div>")
  .find(".k-footer:first")
  .remove();
Note that the popup calendar is shared with all datepickers on the page, so by modifying the calendar rendering will affect all datepickers.

The DatePicker can be globalized registering one of the JS culture files situated in js/cultures folder. Then you will need to set the current culture using this code snippet:
kendo.culture("culture name");
 
//this code sets French culture
 
kendo.culture("fr-FR");

Check this jsFiddle demo, which shows how to accomplish these tasks. 

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
com
Top achievements
Rank 1
answered on 15 Dec 2011, 12:19 PM
I am trying the example trying to see the text in spanish, using this:
kendo.culture("es-ES");

but i don't get the expected result.
What's the culture for spanish?
0
Christophe
Top achievements
Rank 1
answered on 23 Feb 2013, 12:26 PM
load the javascript file js/cultures/kendo.culture.es-ES.min.js:

<script src="js/cultures/kendo.culture.es-ES.min.js" type="text/javascript"></script>
Tags
Calendar
Asked by
Kevin Vanhove
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
com
Top achievements
Rank 1
Christophe
Top achievements
Rank 1
Share this question
or