3 Replies Latest reply on Dec 9, 2009 2:09 PM by Ilya Shaikovsky

    calendar / ajax problem

    Clemens P Newbie

      Hi

      I have 2 <rich:calendar> inputs.
      When the first calendar is changed the date in the second calendar has to be set to the same value as the first one...

      the definition of the first calendar:

      <rich:calendar popup="true" datePattern="dd.MM.yyyy" showApplyButton="false" value="#{testBean.cal1}">
      <a4j:support event="ondateselected" reRender="cal2" ajaxSingle="true" actionListener="#{testBean.calendarChanged}"/>
      </rich:calendar>
      


      When I select a date in the component the method
      calendarChanged in my bean gets called and the method sets the value of cal2 to the value of cal1

      But the value is always "one step behind"...

      If I print out the value of cal1 in the calendarChanged method I always get the value cal1 had BEFORE I selected the new date...


      any ideas ?

      thx