Skip to main content
This topic has been closed for replies.
Correct answer try67

You can use this code:

 

if (event.value) {
	var d = util.scand("mm/dd/yyyy", event.value);
	if (d.getDay()==0 || d.getDay()>=5) {
		app.alert("You may only enter a date between Monday and Thursday.");
		event.rc = false;
	}
}

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 19, 2023

You can use this code:

 

if (event.value) {
	var d = util.scand("mm/dd/yyyy", event.value);
	if (d.getDay()==0 || d.getDay()>=5) {
		app.alert("You may only enter a date between Monday and Thursday.");
		event.rc = false;
	}
}
Participant
September 27, 2023

Thank you! This is the solution I was looking for.