HI,
function CalculateAgeInQC(DOB, txtAge, Txndate) {
if (DOB.value != '') {
now = new Date(Txndate)
var txtValue = document.getElementById(DOB).value;
if (txtValue != null)
dob = txtValue.split('/');
if (dob.length === 3) {
born = new Date(dob[2], dob[1] * 1 - 1, dob[0]);
if (now.getMonth() == born.getMonth() && now.getDate() == born.getDate()) {
age = now.getFullYear() - born.getFullYear();
}
else {
age = Math.floor((now.getTime() - born.getTime()) / (365.25 * 24 * 60 * 60 * 1000));
}
if (isNaN(age) || age < 0) {
}
else {
document.getElementById(txtAge).value = age;
document.getElementById(txtAge).focus();
}
}
}
}
i find it by myself i am posting this answer for some may be need the same
thank you for all