I am trying to do what seems like a fairly simple calculation. User enters one date (AuthFromDate)
in MM/DD/YYYY format and then another date (RecertFromDate) is calculated and displayed
to be 60 days after the entered date. The RecertFromDate field has the ability to be overwritten,
but all the patterns (Display through Data) are set to MM/DD/YYYY.
When I test the form the date appears correctly and is 60 days after the entered date,
BUT I continue to get an error "RecertFromDate validate failed". Also, and this might
help pinpoint the issue, the RecertFromDate field shows 03/01/1900 until you enter
a date into the AuthFromDate.
The following is the script I am using to calculate the 60 days out date:
topmostSubform.Page1.RecertFromDate::calculate - (FormCalc, client)
var AuthFromDateNum = IsoDate2Num(AuthFromDate);
var RecertFromDateNum = (AuthFromDateNum + 60);
var RecertFromDate = Num2Date(RecertFromDateNum, "MM/DD/YYYY");
I have tried to use the following script to initialize either the AuthFromDate and/or
RecertFromDate to see if that would change the 03/01/1900 value, but it does not:
topmostSubform.Page1.RecertFromDate::initialize - (FormCalc, client)
$.rawValue = Num2Date(Date(), "MM/DD/YYYY");
Any ideas of what is happening or how I could fix it would be very appreciated.
Thanks
Renee