1 Reply Latest reply on Jul 25, 2008 12:11 PM by Joel Meurisse

    Calendar datePattern overly restrictive

    Mike Hanafey Newbie

      The rich:calendar datePattern attribute seems to be overly restrictive. For example, you cannot put an E (day in week) or z (timezone) in the pattern. Well, you can, but these characters just display literally, instead of getting substituted with the appropriate date component.

      Internally, it appears a java.text.SimpleDateFormat is being used, so it is not clear why these format characters are not handled as expected.

      Richfaces v3.2.1.GA

        • 1. Re: Calendar datePattern overly restrictive
          Joel Meurisse Newbie

          There are 2 other strange behaviors of the calendar component:

          When using a data pattern without seconds (e.g. datePattern="dd/MM/yyyy HH:mm"), and you fill a date with seconds (e.g. 16/07/2008 17:58:33). The seconds are stripped from the date when setting the property of the backing bean, but put back when rendering the page.

          When using a data pattern specifying seconds (e.g. datePattern="dd/MM/yyyy HH:mm:ss"), clicking the icon for the popup does not propose hours and minutes anymore (same for the seconds).