title: Calculate Age while entering D.O.B manually
body: <p>I have used Ajax Calender to find the Age, I have used the calender on one textbox and shown the Age on Next Texbox. Till now everything is fine, but Now I have two problems</p>
  
  <p>First Problem:- I want the Age Textbox to be Disable so that user can't change the Age, but as I make it disable it doesn't store anything in the Database, now I don't understand what to do.</p>
  
  <p>Second Problem:- It might be possible that User start entering the D.O.B manually and not by selecting it from calender, in that case nothing is calculated, how to apply functionality in such a manner that still Age get's calculated.</p>
  
  <p>JavaScript code is as follows, now how to make it work while the User enter the D.O.B manually in the Textbox!!</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function DateSelectionChanged(e) {
  
          var today = new Date();
          var dob = e.get_selectedDate();
          var months = (today.getMonth() - dob.getMonth() + 
                        (12 * (today.getFullYear() - dob.getFullYear())));
          document.getElementById("txtCONSULTANT_AGE").value= Math.round(months/12);
          document.getElementById("txtCONSULTANT_AGE").readOnly = true;
      }    
  &lt;/script&gt;
  </code></pre>
  
  <p>Here DateSelectionChanged is called on the OnClientDateSelectionChanged of Ajax Calender Extender</p>
  
  <p>Thanks is Advance.</p>