1 Reply Latest reply on Nov 7, 2008 7:42 PM by Nick Belaevski

    Extending rich:calendar for

    Michael Glock Newbie

      Hi,

      I would like to have a rich:calendar component whose input field only accepts dates between 01.01.1980 and 31.12.2100 when a user enters a date manually. In this case, a message should appear stating that the date range is not valid.

      I could surely define a validator for each calendar to achieve that but we have many pages containing calendars and I was looking for a (more elegant) solution that _guarantees_ a valid date.

      So I tried to extend HtmlCalendar where a validator is attached to in order to make sure that the date validation occurs each time a calendar is used. Unfortunately I was not successful (I did not quite understand how to extend richfaces components).

      Do you have any recommendations? Are there other possibilities to achieve this goal? Maybe just using a date pattern or some other easy solution?

      I appreciate your suggestions and your help. Many thanks!

      Regards