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!