For the datepicker control in jQuery UI, is there a way to mix absolute ranges with a relative range?
For example, how would you express, I want the year to only go back to 2005, but only show up to the current year?
I’ve tried mixing the two, using something like ‘2005:+0’, but this results in no years being available in the menu.
Year Range documentation:
yearRange
Type:
String
Default:
‘-10:+10’Control the range of years displayed in the year drop-down: either relative to current year (-nn:+nn) or absolute (nnnn:nnnn).
Here you go. Just need to use a Date object to get the current year.
Working Demo
Code from Demo