I want to format the date from the <rich:calendar> component to have the following format "yyyy-MM-dd". Inside the component, I used datePattern="yyyy-MM-dd" and the date is being displayed correctly.
<rich:calendar id="start" value="#{report.start}" datePattern="yyyy-MM-dd" >
Being displayed: 2008-01-01
Problem:
When I store the value from the calendar component inside a Java Bean, the date has different format (e.g. Tue Jan 01 00:00:00 EST 2008). How do I store the date as "yyyy-MM-dd" fromat inside my Java Bean?
Try binding calendar to String type property.