I have a LC form (v8.0) with 2 date/time fields.
DateNow = calculated value for current date, formatted MM/DD/YY.
DateRequested = formatted mm/dd/yy with date control for selection.
I need to validate that the DateRequested is not before the DateNow. I have this script on the exit event for DateRequested:
----- Root.Page1.DateRequested::exit: - (JavaScript, client) ---------------------------------------
if (this.rawValue != null)
{
if (this.rawValue < DateNow.rawValue)
{
xfa.host.messageBox("Please check your Requested date. It cannot be before the current date!", "Date Checker", 3);
this.rawValue = null;
// to set focus to the DateRequested field so that the user can type his new value..
xfa.host.setFocus(this.somExpression);
}
}
The problem is that the rawValue for DateNow is returning "12/4/08" but the rawValue for RequestedDate is returning "2008-12-01" and it does not validate as being prior to the current date (DateNow). What am I missing?
Thank you for any assistance provided.
George Kaiser