Calculate AGE based on Date of birth using jQuery Calendar

Hi guys, Bushan here, welcome back to B2 Tech! Today in this video, I will show you how to calculate Age based on Date of birth using jQuery Calendar so let’s get started! If you are creating any kind of registration form, having fields like Date of birth and Age is very very common, the user will enter the date of birth and we need to calculate the age based on the date of birth, we should not allow the user to enter Age manually that’s a bad idea. Age will always depend on the date of birth so today in this article let’s find out how to achieve that.



The first step is to create a new HTML file, jqueryAgeCalculator.html and add all the boilerplate code

The second step is to add 3 libraries to HTML page inside the head tag, you can download all these libraries from the below link,

jQuery core library – Download
jQuery UI style library – Download
jQuery UI javascript library – Download



The third step is to create 2 textboxes and give an ID to each textbox.

The fourth step is to add this jquery code inside the script tag, to calculate the Age

Here is the complete source code,



 jqueryAgeCalculator.html

This is how you can calculate Age based on Date of birth using jQuery Calendar, I hope this article is helped you in one or the other way if you like this article share this with your friends. Thank you so much for reading, I will see you in the next article.

Love this post?

Help me to buy a cup of coffee/Support us by donating.
All the donations will be go to the website maintenance/improvement.


Download the file,



jqueryAgeCalculator.html – Download

About the author

Bushan Sirgur

Well, I am Bushan Sirgur from Banglore, India. Currently, I am working as a Software Developer in a Service Base Company. I am interested in JAVA/J2EE, Angular 2, JavaScript, jQuery, MongoDB.

View all posts

4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *