convertDateTime: problems with year conversion
843842Aug 9 2005 — edited Aug 9 2005In my application I want the user to enter a date into an input field following the pattern "d.MM.yyyy". Here's my code (where myDate is of type java.util.Date):
...
<h:inputText value="#{contentHandler.myDate}">
<f:convertDateTime type="date" pattern="d.MM.yyyy" />
</h:inputText>
...
Everything works fine until someone enters a date with a two-digit year, for example "12.08.05". This input is converted to "12.08.0005" but I'd rather have it converted to "12.08.2005". Any ideas or suggestions?