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

Hi,

It turns out there was an issue with Adobe Reader version 9.3.1.  Once I upgraded to version 10.1.3 and I fixed the pattern in the departure date field, it worked.  However, after further testing, I foung that if you enter the Departure Date FIRST and then the Arrival Date, it allows you to enter an invalid date (ie: earlier than the current date or a date ealier than the arrival date)   How do I add validation for this scenario, in which the user enters the fields out of order?  (departure date and then arrival date)    Right now, it only works with the above FormCalc if the user enters the Arrival Date and then the Departure Date.

Thanks!!