dsternj / mobiscroll

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

24 hour time returns wrong hours #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is my JS: $('#date1').scroller({ theme: "ios", mode: "scroller", 
startYear: currYear, endYear: currYear + 2, dateFormat : 'dd-mm-yy', dateOrder 
: 'ddmmyy', preset: 'datetime', ampm: false, timeFormat: 'hh:ii' });

This is my html: <input type="text" name="date1" id="date1" class="mobiscroll" 
value="28-05-2012 19:30" />

When i select a time like 16:50 it does not returns 16:50 but 04:50.

When the picker loads it selects the right time, so it has 19:30 selected.

What is the expected output? What do you see instead?
Expected: 28-05-2012 16:50 instead: 28-05-2012 04:50

What version of the product are you using? On what operating system?
1.5.2 Win7 64Bit Server: ubuntu 10.04 64 bit

Please provide any additional information below.

Original issue reported on code.google.com by rtenkloo...@gmail.com on 28 Dec 2011 at 6:09

GoogleCodeExporter commented 9 years ago
For timeFormat use 'HH:ii' instead of 'hh:ii'. HH is for 24 hour format, hh is 
for 12 hour format. It looks like it's not included in the docs, but I will fix 
it.

Original comment by diosla...@gmail.com on 3 Jan 2012 at 7:37

GoogleCodeExporter commented 9 years ago
timeFormat string is now documented

Original comment by diosla...@gmail.com on 3 Jan 2012 at 9:07

GoogleCodeExporter commented 9 years ago
this is my problem to and its not solved by using HH ! thats my code : 
 $('#o2end').scroller({ preset: 'datetime' , dateFormat: 'yy-mm-dd'  , timeformat: 'HH : ii', ampm: false});

i want to save the value as a datetime in mysql , but Am/pm is not supported 
there ! what can i do ? 

Original comment by jhi...@gmail.com on 29 Apr 2012 at 8:46

GoogleCodeExporter commented 9 years ago
Use timeFormat instead of timeformat, javascript variables are case sensitive.

Original comment by diosla...@gmail.com on 29 Apr 2012 at 10:01