1 Reply Latest reply on Jul 19, 2012 8:11 AM by Siva P

    Calendar validation for only newly changed dates

    zz alafarm Newbie

      I've got a page with a couple of calendars with a validator to ensure entering a future date. When the page loads, the date gets pre-populated from the database--the validator runs when the page loads and when the page is submitted. Here's the issue: I only want the validator to run on newly entered or changed dates, not on dates that were pulled from the DB (it's ok for the date to be old if it was already in the DB).

       

      How can I get the validator to fire for only newly entered or changed dates?

       

      <rich:calendar value="#{additionalInfoFile.activateDate}"  

               cellWidth="24px" cellHeight="22px" style="width:100px" datePattern="MM/dd/yyyy HH:mm a" 

               validatorMessage="Should be a future date."

               inputSize="19" enableManualInput = "false">

               <f:validator validatorId="futureDateValidator"/>

      </rich:calendar>