This message is for gkaiseril or for anyone else who can answer this for me.
I found a code that gkaiseril had posted in another forum about 4 years ago. It's a basic code that gives me an alert if a date entered is before the current date and asks you to enter a date on or after the current date.
Problem: If you enter the current date I still get the alert. A date after the current date it's fine.
I need to have so the current date AND on can be entered without the alert.
Any help would be appreciated.
Here's the code:
if (event.value != "")
{
// get system date object
sysDate = new Date();
// get entered date object
tstDate = util.scand("mmmm d, yyyy", event.value);
// compare dates
if (tstDate < sysDate)
{
app.alert("Entered date before current date.\rPlease reenter a date on or after " + util.printd("mmmm d, yyyy", sysDate), 1, 0);
this.getField(event.target.name).setFocus();
event.rc = false;
}
}
if (tstDate.getTime() < sysDate.getTime())
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com