0
votes

I'd like to use a Calendar component from the primefaces as shown here: PrimeFaces - ShowCase : Calendar - Time

<p:calendar id="startDateSelected" value="#{myBB.dateSelected}" 
pattern="dd/MMM/yyyy">

dateSelected is just a plain Date()

It works fine for the patterns mentioned in the showcase, but I'd like to use the following pattern:

dd-MMM-yyyy HH:mm

When I use this, the dialog with picker doesn't show up. When I remove the time from the pattern, the picker works(only for date obviously) and if I change MMM to MM, it also works.

  • dd-MMM-yyyy works
  • dd-MM-yyyy HH:mm works
  • dd-MMM-yyyy HH:mm doesn't work

So the only problem is a combination of MMM and time. Any ideas?

1

1 Answers

2
votes

I have used following pattern at my side.

EEE, dd MMM, yyyy

<p:calendar value="#{calendarBean.date3}" pattern="EEE, dd/MMM/yyyy HH:mm" />

EEE, dd MM, yyyy

<p:calendar value="#{calendarBean.date2}" pattern="EEE, dd MM, yyyy HH:mm" />
    

It is wokring fine on my side.

enter image description here