Hello
I don't have a lot of experience writing javascript of an interactive Form and I need to validate the date entered by the user is > than tomorrow's date. This date is in a table so I wrote the code in the validate event of the field. I don't see the error message even if I write a date in the past. Here is the code:
data.Sect.Action.Action.Row1.dueDate::validate - (JavaScript, client)
var todayDate = new Date();
var newDate = this.rawValue;
// define 1 day in milliseconds
var oneDay = 1 * 24 * 60 * 60 * 1000;
// add 1 day to the today's date
var tomorrowDate = todayDate.getTime() + oneDay;
if(newDate < tomorrowDate)
{
xfa.host.messageBox("Please, do not write date in the past");
this.rawValue = tomorrowDate;
}
Could you please help me?
Thank in advance!
Marie-Josée