-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvalidation.js
29 lines (27 loc) · 862 Bytes
/
validation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function Day(getdate) {
var selectedDate = new Date(getdate);
var dateformat = getdate.split('-')
var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
if(!(days[selectedDate.getDay()]=="Tuesday" || days[selectedDate.getDay()]=="Friday")){
alert("Please enter date corresponding to Tuesday or Friday")
document.getElementById("date").value= "";
}
}
let file="";
function CaseFile(){
var x = document.getElementsByName('file_case');
if(x[0].checked)
file= x[0];
else
file= x[1];
details();
}
function details() {
var name=document.forms["Form"]["name"];
var phone=document.forms["Form"]["phone"];
var date=document.forms["Form"]["date"];
var slot=document.forms["Form"]["slot"];
var file_case;
CaseFile();
file_case=file;
}