1 Reply Latest reply on Jan 16, 2009 6:14 AM by Nick Belaevski

    <rich:calendar> format date 'yyyy-MM-dd' for Java Bean

    Greg Cook Newbie

      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?