1 Reply Latest reply on Sep 15, 2009 6:47 AM by nbelaevski

    validation of invalid date pattern in rich:calendar with man

    k_krish_rao

      I have a rich:calendar placed in my application where enableManualInput is set to true. The datePattern is set to "MMM d, yyyy".
      I have an commandButton "add" next to the calendar which adds the date to a dataTable.

      If i enter a wrong date format say, 15/09/2009 (Sep 15, 2009) in the calendar component and then click on add button. I get the following message in my jboss server log

      [javax.enterprise.resource.webcontainer.jsf.lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=calendarform:textualTabCalendar[severity=(ERROR 2), summary=(calendarform:textualTabCalendar: '15/09/2009' could not be understood as a date.), detail=(calendarform:textualTabCalendar: '15/09/2009' could not be understood as a date. Example: Sep 15, 2009 )]

      I have a few system.out.println statements in the action method of the
      commandButton. But they do not get executed. The date seems to be validated by the rich framework.
      How can I validate wrong date pattern in case of manual input