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

kendo-date-picker and angularjs date format issue

3 Answers 1139 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Enrico
Top achievements
Rank 1
Enrico asked on 13 Oct 2014, 07:53 AM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Nikolov
Telerik team
answered on 15 Oct 2014, 07:04 AM
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!
 
0
Zoran
Top achievements
Rank 1
answered on 16 Nov 2015, 03:27 AM

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 

 

 

0
Helen
Telerik team
answered on 16 Nov 2015, 07:52 AM
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!
 
Tags
Date/Time Pickers
Asked by
Enrico
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Zoran
Top achievements
Rank 1
Helen
Telerik team
Share this question
or