2 Replies Latest reply on Oct 18, 2012 9:35 AM by Chris Brueckner

    rich:calendar defaultlabel text causing page validation error

    Chris Brueckner Newbie

      I'm using the calendar for an optional date input on the form.  When "defaultLabel" is set and the user leaves the field blank, validation fails telling me the string provided by defaultLabel is not a valid date.  If I remove "defaultLabel" the form will validate with the blank date field.

       

      <rich:calendar id="optionalDate" value="#{someMgmntBean.optionalDate}" datePattern="M/d/yyyy" enableManualInput="true" defaultLabel="MM/dd/yyyy"/>

       

      validation failure message:

      someForm:optionalDate: 'MM/dd/yyyy' could not be understood as a date. Example: 10/17/2012