vitalets / combodate

Dropdown date and time picker
http://vitalets.github.com/combodate
207 stars 82 forks source link

Default maxYear to the current year, not 2015 #54

Open colbywhite opened 8 years ago

colbywhite commented 8 years ago

For an example, take a look at the demo page. None of those dropdowns allow you to select 2016 since the default max is 2015.

The default should be whatever the current year is. The trick to that will be dealing with timezones. The current year will be different depending on browser.

vcarel commented 8 years ago

+1 I'm lazy to make a pull-request, but the solution is pretty simple:

In src/combodate.js, line 513, replace: maxYear: 2015 by: maxYear: (new Date()).getFullYear()