jQuery UI datepicker age validation
<p>I am making a dating website so I want people only above 18 years of age to join. I am using jQuery UI datepicker. I want that the YEAR section shows 18 years less (1997) instead of current year (2016) so that people only above age of 18 can join the system. And every new year it shifts like maximum year selection will be 1998 next year and 1999 the 2nd year and so on.</p>

<p>Here is my code: </p>

<pre><code>&lt;script&gt;
$(function(){
    $("#datepicker").datepicker({
      changeMonth: true,
      changeYear: true,
      dateFormat: 'yy-mm-dd'
    });
});
&lt;/script&gt;
</code></pre>

<p>Thanks in advance :)</p>