FormCalc issues with Windows 7

Avatar

Avatar

JenPWebFPL

Avatar

JenPWebFPL

JenPWebFPL

05-06-2012

Hi,

I am using FormCalc to check two date fields. The first one, the arrival date, should not be earlier than today's date. The second field, departure date, should not be earlier than the arrival date.  The FormCalc is in the Exit event of the date field.  It works perfectly fine in XP, but the validation is not working Windows 7.   The user does not get the pop up box at all and is able to submit the form with invalid dates.  Does anyone know of an issue with FormCalc and Win 7??   It does not seems to be an issue with the Adobe Reader version.  I tried with version 9.3.4 and XP and someone else with Adobe Reader 9.3.4 and Win 7 and the date validation did not work.

Here is my code:

Arrival Date:

form1.page1.main.travelInfo.arrDate::exit - (FormCalc, client)

if (Date2Num($.formattedValue, "MMMM D, YYYY") < Date()) then

    xfa.host.messageBox("Arrival Date must be later than the current date")

    $ = ""

endif

Daparture Date:

form1.page1.main.travelInfo.deptDate::exit - (FormCalc, client)

if (form1.page1.main.travelInfo.deptDate.rawValue <  form1.page1.main.travelInfo.arrDate.rawValue) then

    xfa.host.messageBox("Departure Date must be later than the Arrival Date")

    $ = ""

endif

Thanks in advance!

View Entire Topic

Avatar

Avatar

JenPWebFPL

Avatar

JenPWebFPL

JenPWebFPL

06-06-2012

radzmar - Thanks so much for your suggestion.  I changed the code in the deptDate field to the above code, but the pop up box comes up no matter what date I choose, so it's not validating correctly.   The arrDate field works fine.  Any thoughts?

Code from deptDate:

 

form1.page1.main.travelInfo.deptDate::exit - (FormCalc, client)

 

 

if

(Date2Num($.formattedValue, "MMMM D, YYYY") lt Date2Num(arrDate.formattedValue, "MMMM D, YYYY"))  then

$host.messageBox("Departure Date must be later than the Arrival Date")

$

=

""

endif