Allow Date Function - Disable Selection of Sunday

hspslsc

New Member
using the date element, i want to disable the selection of Sunday's. i have read through the forums, etc. and tried a few versions of the js but have not had success.

here is my code, which makes sense to me but doesn't work (i'm not a js coder)

var result = false;
var d = new Date(date);
var n = d.getDay();
if (n != 0) {
result = true;
}
 
ha, solved it myself....interpretation of false and true.

var result = true;
var d = new Date(date);
var n = d.getDay();
if (n > 0) {
result = false;
}

if you looked and thought about, thanks for your time.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top