This content has been marked as final.
Show 1 reply
-
1. Re: rich:calendar doesn't work with joda DateTime
david.coleman Aug 27, 2009 2:46 AM (in response to austral)Hi Austral,
I found this link http://www.jroller.com/ThoughtPark/entry/facelets_and_joda_time very beneficial, it explains how to integrete an Joda DateTime converter thats freely available on the internet very well.
However, I did have problems integrating the Joda DateTimeConverter with the rich:calendar but after doing some debugging, I discovered the problem. The attribute 'datePattern' on rich:calender only formats the string on the client site; it does not call 'customConvert.setPattern' on the date time converter, therefore, the front-end and back-end date formats were incompatible.
I ended up getting it to work by specifying the 'datePattern'in both the calendar and the converter as follows:<rich:calendar value="#{searchEntry.dateOfBirth}" datePattern='yyyy-MM-dd H:mm'> <joda:convertDateTime type='both' pattern='yyyy-MM-dd H:mm'/> </rich:calendar>
Regards
Dave