BIANEMohamed / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

datepicker can't parse a string value with a time component #1057

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. <sj:datepicker value="2004-08-14 03:25" displayFormat="yy-mm-dd" 
timepicker="true" timepickerFormat="hh:mm"/>
2.
3.

What is the expected output? What do you see instead?
The above tag should display the date and time as "2004-08-14 03:25" but it 
shows "2004-08-14 12:00" because the time component is never parsed

Which struts2 version? 2.3.15.2

Which struts2-jquery plugin version? 3.6.1

Please provide any additional information below.
DatePicker.java parses the string value according to some patterns that never 
take into consideration the timepickerFormat attribute, so the time component 
is always lost.

Original issue reported on code.google.com by vmlmil...@gmail.com on 25 Oct 2013 at 2:11

GoogleCodeExporter commented 9 years ago
I have the same issue. My default value is "2014-02-28 10:45 AM" but it shows 
up "2014-02-28 00:00 AM" instead.

Original comment by richardy...@gmail.com on 21 Feb 2014 at 4:04

GoogleCodeExporter commented 9 years ago

Original comment by johgep on 10 Apr 2014 at 7:19

GoogleCodeExporter commented 9 years ago
Issue 1072 has been merged into this issue.

Original comment by johgep on 10 Apr 2014 at 7:56

GoogleCodeExporter commented 9 years ago
Is `dd/mm/yy` a valid pattern for datepicker's displayFormat attribute???

Original comment by prem30...@gmail.com on 11 Jul 2014 at 6:29

GoogleCodeExporter commented 9 years ago
when will this issue be resolved?

Original comment by kamalpat...@gmail.com on 1 Jan 2015 at 4:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Waiting for it to be solved, there is an easy workaround:

http://stackoverflow.com/a/27544567/1654265

Original comment by andreali...@gmail.com on 7 Jan 2015 at 1:44