PDA

View Full Version : [OPEN-1139] TimeField Bug



jlcasto@gmail.com
19 Jul 2010, 1:05 PM
When I enter "1AM" into the time field, it resolves to "13:00" with the format "H:i"

Entering "1am" on the other hand resolves to "01:00" as expected.

We are using ExtJS 3.0.0 and the bug seems to happen on both FF and IE. I checked out some sample code online and saw it happening there as well.

Jamie Avins
20 Jul 2010, 8:40 AM
Please try to follow the bug forum guidelines (http://www.sencha.com/forum/showthread.php?71015-Posting-to-the-Bug-Forum) when posting. Do you have a full test case for this issue?

jlcasto@gmail.com
20 Jul 2010, 8:54 AM
I'm unable to copy/paste our code, but found the same bug here:

http://www.java2s.com/Code/JavaScriptDemo/TimeFieldExample.htm

Type "1am" (case sensitive) into the field
Notice that "1:00 AM" is the result

Now type "1AM" (case sensitive) into the field
"1:00 PM" is the new result

The bug happens in IE6, 7, and 8, and FF 3.5.3

I'm fairly certain it has to do with the parseDate function