Setting Year Range Dropdown in jQuery UI Datepicker

jQuery UI - Datepicker

By default, jQuery UI Datepicker’s year dropdown shows only 10 years. It is alright if we are using Datepicker to select recent date, but what if user needs to go way back (like 50 years)? This will create a big inconvenience if we are using jQuery UI Datepicker for birthdate. The solution is to add yearRange option when initializing jQuery UI Datepicker. This will extend the amount of years generated on the dropdown. See the full snippet below: [crayon-673f098496327234215047/]  

Sliding Sidebar