Restrict the user from selecting a date less than two weeks from the current date.
I am wanting to restrict the user from selecting a date less than two weeks from the current date. Is this possible in Adobe acrobat's date field?
I am wanting to restrict the user from selecting a date less than two weeks from the current date. Is this possible in Adobe acrobat's date field?
I managed to sort it using Googles AI
if (event.value) {
var d = util.scand("dd/mm/yyyy", event.value);
var today = new Date();
var twoWeeksFromNow = new Date(today.getTime() + (14 * 24 * 60 * 60 * 1000));
if (d < today || d < twoWeeksFromNow) {
app.alert("Please select at least 2 weeks from today.");
event.rc = false;
}
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.