jsf 2 - Primefaces calendar date pattern pm and am changed -
i have p:calendar
:
<p:calendar showbuttonpanel="true" showon="button" timezone="#{settingsbl.gettimezoneidset()}" mask="true" pattern="#{searchbl.determinedatetimepatternforfield(cc.attrs.curmaskelement)}" />
if click on button current date locale de_de
value 22.10.15 15:40:37
set. after submitting form calendar shows value 22.10.15 15:40:37
corrent. pattern dd.mm.yy hh:mm:ss
. if switch locale en_us
, click current date button, calendar input gets 10/22/15 3:43:18 pm
. if submit or click on calendar input field (gets focus) value gets 1/0/22 1:53:43 1
. pattern m/d/yy h:mm:ss a
. calendar bug?
i determine pattern locale this:
dateformat di = dateformat.getdateinstance(dateformat.short, currentlocale); if (di instanceof simpledateformat) { final simpledateformat sdf = (simpledateformat) di; this.datepattern = sdf.topattern(); }
i using primefaces 5.2.14.
Comments
Post a Comment