Solution function calculateAge() { var dob = $('#DateOfBirth').val(); dob = new Date(dob); var today = new Date(); var age = Math.floor((today - dob) / (365.25 * 24 * 60 * 60 * 1000)); $('#Age').val(age); } Explanation dob will get the date of birth from DateOfBirth text box. It will convert it into date so to... Continue Reading →