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

parseFormat 'M/d/yyyy' not converted to format 'M/d/yy' properly

3 Answers 128 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Feb 2013, 11:53 AM
Look at my sample code here:
http://jsfiddle.net/CXcky/

In the second datepicker, if you manually enter 12/3/2012 and then tab out it gets truncated to 12/3/20.
I expect this to truncate it to 12/3/12.

3 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 22 Feb 2013, 12:30 PM
Hello Peter,

 
Here is a quote of the bug report opened on the same subject:


The format property is extended with the parseFormats array and thus the result will be:

["MM/dd/yy""MM/dd/yyyy"]
In this case the first format is able to parse a "10/10/2013" string and only two digits from the year part will be taken. This is expected and in order to overcome this limitation you can change the order of the formats in parseFormats array. Check the updated jsFiddle demo. 
We will further investigate the case and will try to improve current behavior of parseFormats.


I will ask you to continue our conversation in only one thread in order to avoid any duplications.

All the best,
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
Peter
Top achievements
Rank 1
answered on 27 Feb 2013, 08:02 AM
That works for Chrome Firefox and IE8.
In IE9 however if I type something like 02/03/1913, it changes it to 02/03/13 and the actual value is  Feb 3, 2013.
In your fiddle you can see this by typing 02/03/1913 and then opening the datepicker which will then be initialised to 02/03/2013

0
Georgi Krustev
Telerik team
answered on 28 Feb 2013, 10:04 AM
Hello Peter,

 
Thank you for pointing this issue. Unfortunately, the desired functionality is not supported with the current official version of Kendo UI. We will refactor current behavior of the widget in order to support these scenarios. The next official release of Kendo UI due in end of March will have this changes. For now I will suggest you use only one of the desired formats.

PS:
I updated your Telerik points because of the involvement.

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!
Tags
Date/Time Pickers
Asked by
Peter
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Peter
Top achievements
Rank 1
Share this question
or