开发者

jquery ui datepicker dynamic multiple ranges for years

I'm working with the jQuery UI datepicker and have a table setup with each cell representing a specific year. When the user selects two different ranges of years (say 1950-1960, and 1990-2000), I want only those selected years to appear in the datepicker's year drop-down menu. I have the list of years in an array "dates_selected" - but I'm not sure how to restrict the years in this datepicker to the years listed. Is there a way I 开发者_如何学JAVAcan combine two sets of year ranges (yearRange: '1950:1960', '1990:2000') or something similar? Thanks!


you are going to need to look at the options provided by the JQuery UI in particular the minDate and maxDate values, if as you suggest you have already completed the collection of the years it is relatively simple to add these to your options.

hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜