4 Replies Latest reply on May 29, 2012 4:19 AM by nguyen tung son

    a4j:support on rich:calendar (or validation)

    Thai Dang Vu Apprentice

      I want to validate a calendar field. So I write something like this:

      <a4j:outputPanel layout="block" id="referralTab1DOBox">
       <rich:calendar value="#{referral.tab1Data.dob}" popup="true" cellWidth="24px" cellHeight="22px"
       style="width: 200px;" enableManualInput="true" datePattern="MM/dd/yyyy"
       id="referralTab1DOB">
       <a4j:support event="oninputblur" reRender="referralTab1DOBox" ajaxSingle="true"
       bypassUpdates="ture" oncomplete="alert('hi'); MH_init();" />
       <f:validator validatorId="referral.DOB"/>
       </rich:calendar>
       <ifx:message ajax="true" for="referralTab1DOB"/>
      </a4j:outputPanel>

      I enter a date in the field and press Tab to trigger the oninputblur event, but I don't see the alert message in the oncomplete. Did I do anything wrong? Or is there anyway to do it (all I want is to validate the entered date right after I have it)?