modified contact inform form
This commit is contained in:
parent
731981f36a
commit
158bd61be7
3 changed files with 210 additions and 226 deletions
36
scripts/index.js
Normal file
36
scripts/index.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Calendar Validation
|
||||
function toAppointment() {
|
||||
document.getElementById('appointment').scrollIntoView();
|
||||
}
|
||||
|
||||
var value = 0;
|
||||
|
||||
$(function() {
|
||||
$("#datepicker").datepicker({
|
||||
beforeShowDay: getAvailability
|
||||
});
|
||||
});
|
||||
|
||||
function getMechanic(selectObject) {
|
||||
value = selectObject.value;
|
||||
}
|
||||
|
||||
function getAvailability(date) {
|
||||
|
||||
if (value == 1 && (date.getDay() === 0 || date.getDay() == 6)) /* restrict weekends */
|
||||
return [false]
|
||||
if (value == 2 && (date.getDay() === 0 || date.getDay() == 1 || date.getDay() == 4 || date.getDay() == 5 || date.getDay() == 6)) /* restrict M,Thurs, Fri, Sat, Sun */
|
||||
return [false]
|
||||
if (value == 3 && (date.getDay() === 0 || date.getDay() == 4 || date.getDay() == 5 || date.getDay() == 6)) /* restrict Thurs, Fri, Sat, Sun */
|
||||
return [false]
|
||||
if (date.getDay() === 0 || date.getDay() == 6) /* weekends */
|
||||
return [false]
|
||||
else
|
||||
return [true, "", ""]
|
||||
}
|
||||
|
||||
//Form Validation
|
||||
function validateForm(){
|
||||
//first check that the user has selected,
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue