Localisation date format

4 posts, 0 answers
  1. Kevin Vanhove
    Kevin Vanhove avatar
    6 posts
    Member since:
    Oct 2011

    Posted 01 Nov 2011 Link to this post

    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,
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 03 Nov 2011 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. com
    com avatar
    7 posts
    Member since:
    Oct 2011

    Posted 15 Dec 2011 Link to this post

    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?
  5. Christophe
    Christophe avatar
    1 posts
    Member since:
    Feb 2013

    Posted 23 Feb 2013 Link to this post

    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>
Back to Top
Kendo UI is VS 2017 Ready