kendo-date-picker and angularjs date format issue

4 posts, 1 answers
  1. Enrico
    Enrico avatar
    54 posts
    Member since:
    Jun 2013

    Posted 13 Oct 2014 Link to this post

    Hi,

    I'm having an issue when formatting a date in my locale it-IT. I've set up angular-locale_it-it.js and kendo.culture.it-IT.min.js and my date picker looks like this:

        <input kendo-date-picker
                    k-format="'dd/MM/yyyy'"
                    ng-model="model.Date"
                    name="Date" required />

    where model.Date is coming from the server in this format: "2014-10-08T00:00:00+02:00" and is displayed as it is. I'm expecting it to be: "08/10/2014" instead.

    I'm using: AngularJS v1.2.21 and Kendo UI v2014.2.1008

    Do you have any suggestion?

    Thanks,
    Enrico
  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 15 Oct 2014 Link to this post

    Hi Enrico,

    You need to specify the parse format that will be used for parsing this string as a date. Here is an example:

    http://dojo.telerik.com/UsEka/2

    Regards,
    Kiril Nikolov
    Telerik
     
    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. Alex
    Alex avatar
    1 posts
    Member since:
    Nov 2015

    Posted 15 Nov 2015 in reply to Kiril Nikolov Link to this post

    Hi, 

     I am trying to format the datepicker in the au format but does not work in the above example. 

     Format I want "dd/MM/yyyy".

     http://dojo.telerik.com/UsEka/2 

     

     

  5. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 16 Nov 2015 Link to this post

    Hello Alex,

    I've already answered your ticket regarding the same issue. Please use the following configuration:

    k-format = "'dd/MM/yyyy'"

    instead of:

    k-format = "dd/MM/yyyy"

    Hope it helps.

    Regards,
    Helen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready