hehaipeng / mobiscroll

Automatically exported from code.google.com/p/mobiscroll
0 stars 0 forks source link

Incorerect parsing of am/pm time for 12:xx AM #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Go to demo
2.Set time in time control to 12:12 AM
3.Set and reopen the control
4.Control shows 12:12 PM

What is the expected output? What do you see instead?
12:12 AM

What version of the product are you using? On what operating system?
1.5.1

Please provide any additional information below.
The bug is in parseDate function. 

if (ampm && hours < 12) 
hours += 12;

should be 

if (ampm && hours < 12) 
hours += 12;
else if (!ampm && hours == 12)
hours = 0;

Original issue reported on code.google.com by l...@kmdm.com on 16 Oct 2011 at 4:50

GoogleCodeExporter commented 8 years ago

Original comment by diosla...@gmail.com on 17 Oct 2011 at 5:51

GoogleCodeExporter commented 8 years ago

Original comment by diosla...@gmail.com on 24 Oct 2011 at 10:08