How to Calculate AGE using DOB in jQuery?

Hi Folks, In this post, we are going to see, how to calculate AGE using Date Of Birth in jQuery. It’s very simple code.

Find the code below

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Datepicker - Display month & year menus</title>
  <link rel="stylesheet" href="//">
  <script src=""></script>
  <script src=""></script>
 $(function() {
	onSelect: function(value, ui) {
        var today = new Date(), 
            age = today.getFullYear() - ui.selectedYear;
	dateFormat: 'dd-mm-yy',changeMonth: true,changeYear: true,yearRange:"c-100:c+0"
<p>Dob: <input type="text" id="nu_datebirth" name="nu_datebirth"></p>
<p>Age: <input type="text" name="a_ge" id="a_ge" class="nu_field" readonly/></p>