JQuery UI Datepicker, reverse the order of the year in the dropdowns

后端 未结 6 519
梦毁少年i
梦毁少年i 2020-12-01 16:58

I have a datepicker with changeyear: true. The \'year\' drop down displays the title as 2009, then instead of the next year below the title being 2008, 2007, 2006 and so on

6条回答
  •  执笔经年
    2020-12-01 17:25

    Replace the first line of the for loop with:

    var minYear = year;
    year = endYear;
    for (; year >= minYear; year--) {
    

提交回复
热议问题