This content has been marked as final.
Show 2 replies
-
1. Re: Help with a date field script
try67 Dec 2, 2014 3:20 AM (in response to Nagannudj)I have a feeling I already answered this question some time ago... Anyway, you can use this code as the field's custom validation script:
var minDate = util.scand("mm/dd/yyyy", "12/31/1899"); var maxDate = new Date(); event.rc = true; if (event.value) { var d = util.scand("mm/dd/yyyy", event.value); if (d<minDate || d>maxDate) { app.alert("Error! The entered date must be between " + util.printd("mm/dd/yyyy", minDate) + " and " + util.printd("mm/dd/yyyy", maxDate)); event.rc = false; } } -
2. Re: Help with a date field script
Nagannudj Dec 2, 2014 7:47 AM (in response to try67)Thank you so much! Exactly what’s needed.


