$("#input_date").blur(function(){
var $this = $(this);
var dateValue = $this.val();
var today = new Date();
var birthDate = new Date(dateValue);
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
$("#input_age").val(age);
});