File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ <h5>Options</h5>
111
111
< td > 10</ td >
112
112
< td > Number of years either side, or array of upper/lower range.</ td >
113
113
</ tr >
114
+ < tr >
115
+ < td > yearRangeReverse</ td >
116
+ < td > Boolean</ td >
117
+ < td > false</ td >
118
+ < td > Sort year range in reverse order</ td >
119
+ </ tr >
114
120
< tr >
115
121
< td > isRTL</ td >
116
122
< td > Boolean</ td >
@@ -760,4 +766,4 @@ <h5 class="method-header">
760
766
</ div >
761
767
762
768
</ div >
763
- </ div >
769
+ </ div >
Original file line number Diff line number Diff line change 513
513
}
514
514
return (
515
515
`<td data-day="${ opts . day } " class="${ arr . join ( ' ' ) } " aria-selected="${ ariaSelected } ">` +
516
- `<button class="datepicker-day-button" type="button" data-year="${ opts . year } " data-month="${
517
- opts . month
518
- } " data-day="${ opts . day } ">${ opts . day } </button>` +
516
+ `<button class="datepicker-day-button" type="button" data-year="${ opts . year } " data-month="${ opts . month } " data-day="${ opts . day } ">${ opts . day } </button>` +
519
517
'</td>'
520
518
) ;
521
519
}
609
607
arr . push ( `<option value="${ i } " ${ i === year ? 'selected="selected"' : '' } >${ i } </option>` ) ;
610
608
}
611
609
}
610
+ if ( opts . yearRangeReverse ) {
611
+ arr . reverse ( ) ;
612
+ }
612
613
613
614
yearHtml = `<select class="datepicker-select orig-select-year" tabindex="-1">${ arr . join (
614
615
''
You can’t perform that action at this time.
0 commit comments