3
votes

When I use the calendar, I set the "timeOnly" to be "true", "pattern" to be "HH:mm a".

When the input time is larger or equal to "13:00 pm", each time the calendar get the focus, it will

change the time to "23:00 pm" automatically. I have got the same bug from the showcase of the

primefaces in http://www.primefaces.org/showcase/ui/input/calendar.xhtml.

What should I do to solve this bug when using the calendar?

1

1 Answers

0
votes

Time 13:00 pm does not exist, it should be 1:00 pm. It's not a bug, it's probably a typo. Set pattern to "hh:mm a". In my case it works.

<p:calendar id="time" value="#{bean.date}" pattern="hh:mm a" timeOnly="true"  />