Copy link to clipboard
Copied
I currently have this custom validate script.
if (event.value) {
var d = util.scand("dd/mm/yyyy", event.value);
if (d==null) {
app.alert("Please enter a date in dd/mm/yyyy format.");
event.rc = false;
} else if (d.getFullYear()<1900 || d.getFullYear()>2100) {
app.alert("Error! Invalid year.");
event.rc = false;
}
}
This works well except it will allow you to put letters 10/nov/2018 and nov/10/2018. I need only numbers and slashes in the field (no letters for month).
What can I add to this script to make this happen?
Format/Date/Custom, does not work with script.
And without script they can enter "01/01/0994"
Format number no decimal, does not work with script either.
You'll need to write your own custom Format and Keystroke scripts to be
able to do it.
On Thu, 6 Dec 2018 at 14:48, marilynr59152174 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
You'll need to write your own custom Format and Keystroke scripts to be
able to do it.
On Thu, 6 Dec 2018 at 14:48, marilynr59152174 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
That sounds like a good solution, unfortunately I am not very good at creating scripts.
Do you think you can help me out with a custom format and keystroke script?
It would be greatly appreciated.
Thank you