Date Of Birth Validation in JavaScript?
<p>I have a date of birth like 12-08-1989 in text box in HTML.I want to validate that the user must be of 18 years old in javascript.</p>

<p>I have used Date function in javascript but it seems like it accept YYYY-MM-DD format but i want to validate in DD-MM-YYYY.</p>

<p>How can I achieve this?</p>
