Short story:
You're actually forcing RichFaces to use a 24h format by giving HH:mm
as part of the datePattern
. Change it to hh:mm a
to have AM/PM work as intended and used in the showcase.
Long story:
The API docs say:
datePattern [...] Used to format the date and time strings, according to ISO 8601 (for example, d/M/yy HH:mm a)
Where even the example indicates confusion since the standard uses 24h format and thus doesn't have a AM/PM distinction.
This works nevertheless because the input component uses the standard javax.faces.convert.DateTimeConverter
to process datePattern
. And this class' javadoc states:
If a pattern has been specified, its syntax must conform the rules specified by java.text.SimpleDateFormat.
And this format specs distinguish between
H Hour in day (0-23)
h Hour in am/pm (1-12)