I am using a rich:calendar component and having the same difficulty throughout my application. The component always seems to be one step behind when updating the model values. The first time I select a date, no value is changed, I get the original calendar value. The next time I select a date, the value is set to the first value I selected. It always stays one click behind.
Is this a known issue or am I missing something important?
I created some test components to try to isolate the problem but I see it even in this simple case:
<h:form> <rich:calendar popup="false" showApplyButton="false" cellWidth="30px" cellHeight="30px" boundaryDatesMode="none" showWeeksBar="false" value="#{calendarTest.theDate}" showFooter="false" reRender="output" immediate="true" > <a4j:support event="ondateselected"/> </rich:calendar> <div /> <s:div id="output"> <h:outputText value="The Date: #{calendarTest.theDate}" /> <div /> <h:outputText value="The Other Date: #{calendarTest.theOtherDate}" /> <div /> </s:div> </h:form>
use onchanged instead of ondateselected.