Hi,
I developed some code for your requirement
try this
<script language ="javascript" >
function delval() {
var num = document.getElementById("txtdate").value;
var pattern = /(^[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]$)/;
if (num.search(pattern) == -1)
alert("Invalid");
else {
var pd = new Date();
var bd = new Date();
var df = num.split('-');
bd.setFullYear(df[2], df[0], df[1]);
if (bd < pd) {
alert("Valid");
}
else {
alert("DOB is lessthan Today");
}
}
}
</script>
I hope this is work for you too
All the Best