I have a form that the client needs to allow the user to choose an appointment date. It is pretty basic, just need to prevent past dates and Sundays, which I have figured out from the forum and wiki.
Next step I need is to limit the hours to 30 minute increments from 8-4pm MTWF, 8-6pm Thurs and Saturday 9-4pm. I figure I will need to setup another table with open hours and time cdd to make this work. Any other suggestions? Still learning js so be easy on me ;0)
Code:
var result = true;
var d = new Date(date);
var n = d.getDay();
var diff = new Date().compare(new Date(date));
if ( (n > 0) && (diff > 0) ) {
result = false;
}
Next step I need is to limit the hours to 30 minute increments from 8-4pm MTWF, 8-6pm Thurs and Saturday 9-4pm. I figure I will need to setup another table with open hours and time cdd to make this work. Any other suggestions? Still learning js so be easy on me ;0)