Hii,
Facing problem with JavaScript Date format validation.Need to validate Date in Textbox with Id as DOB with MM/DD/YYYY format i have used the below code.
if (document.getElementById("DOB").value == "")
{
alert("Please Enter Date Of Birth");
DOB.focus();
}
else if (!document.getElementById("DOB").value.match(/^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d+$/))
{
alert("Invalid date Format");
DOB.focus();
}
can any one tell me where the fault is?