3 Replies Latest reply on Feb 18, 2010 8:26 AM by ilya_shaikovsky

    How to synchronize oninputblur and onclick events on rich:calendar

    vishal3007

      Hi,

       

      In my project, i have a requirment to change the entered value in rich:calendar in valid date(if possible).

      The conversion is done through some converter.

      For acheiving this, i wrote the following code:

       

      <rich:calendar label="Date Time" id="date10" value="#{dataBean.date10}" width="200px"
               datePattern="dd.MM.yy HH:mm" enableManualInput="true" converter="someConverter" enableManu>

           <a4j:support event="oninputblur" reRender="date10"/>

      </rich:calendar>

       

      The above peice of code working great in every situation except one.

       

      The problem comes when the focus is on the input field and user tries to click on date icon.

      The desired result is to open the calendar popup.

       

      The actual result is:

      As soon as user presses the date icon the component lost focus and tries to reRender the calender and at the same time date icon opens the calender popup. But reRender makes the popup disappear instantly.

       

       

      Any solution to make it synchronize. Means first the reRender happens and then the onclick event.