@@ -18,7 +18,7 @@ $(function()
1818 define a new language named "custom"
1919 */
2020
21- $ . dateRangePickerLanguages [ 'custom' ] =
21+ $ . dateRangePickerLanguages [ 'custom' ] =
2222 {
2323 'selected' : 'Choosed:' ,
2424 'days' : 'Days' ,
@@ -48,7 +48,7 @@ $(function()
4848 'default-range' : 'Please select a date range between %d and %d days' ,
4949 'default-default' : 'This is costom language'
5050 } ;
51-
51+
5252 $ ( '#date-range0' ) . dateRangePicker (
5353 {
5454 } ) . on ( 'datepicker-first-date-selected' , function ( event , obj )
@@ -156,7 +156,7 @@ $(function()
156156 startOfWeek : 'sunday' ,
157157 language :'en' ,
158158 showShortcuts : true ,
159- customShortcuts :
159+ customShortcuts :
160160 [
161161 //if return an array of two dates, it will select the date range between the two dates
162162 {
@@ -188,8 +188,8 @@ $(function()
188188
189189 $ ( '#date-range101' ) . dateRangePicker (
190190 {
191- showShortcuts : true ,
192- shortcuts :
191+ showShortcuts : true ,
192+ shortcuts :
193193 {
194194 'next-days' : [ 3 , 5 , 7 ] ,
195195 'next' : [ 'week' , 'month' , 'year' ]
@@ -199,7 +199,7 @@ $(function()
199199 $ ( '#date-range102' ) . dateRangePicker (
200200 {
201201 showShortcuts : true ,
202- shortcuts :
202+ shortcuts :
203203 {
204204 'prev-days' : [ 3 , 5 , 7 ] ,
205205 'prev' : [ 'week' , 'month' , 'year' ] ,
@@ -277,17 +277,17 @@ $(function()
277277 $ ( '#date-range12' ) . dateRangePicker (
278278 {
279279 inline :true ,
280- container : '#date-range12-container' ,
281- alwaysOpen :true
280+ container : '#date-range12-container' ,
281+ alwaysOpen :true
282282 } ) ;
283283
284284 $ ( '#date-range13' ) . dateRangePicker (
285285 {
286286 autoClose : true ,
287287 singleDate : true ,
288- showShortcuts : false
288+ showShortcuts : false
289289 } ) ;
290-
290+
291291 $ ( '#date-range13-2' ) . dateRangePicker (
292292 {
293293 autoClose : true ,
@@ -483,7 +483,7 @@ $(function()
483483 } ) ;
484484
485485 $ ( '#date-range51' ) . dateRangePicker (
486- {
486+ {
487487 customArrowPrevSymbol : '<i class="fa fa-arrow-circle-left"></i>' ,
488488 customArrowNextSymbol : '<i class="fa fa-arrow-circle-right"></i>'
489489 } ) ;
@@ -500,13 +500,19 @@ $(function()
500500 yearSelect : [ 1900 , moment ( ) . get ( 'year' ) ]
501501 } ) ;
502502
503- $ ( '#date-range54' ) . dateRangePicker (
503+ $ ( '#date-range54' ) . dateRangePicker (
504+ {
505+ monthSelect : true ,
506+ yearSelect : function ( current ) {
507+ return [ current - 10 , current + 10 ] ;
508+ }
509+ } ) ;
510+
511+ $ ( '#date-range55' ) . dateRangePicker (
504512 {
505513 monthSelect : true ,
506- yearSelect : function ( current ) {
507- return [ current - 10 , current + 10 ] ;
508- }
514+ yearSelect : true ,
515+ startDate : moment ( ) . subtract ( 3 , 'months' ) . format ( 'YYYY-MM-DD' ) ,
516+ endDate : moment ( ) . endOf ( 'day' ) . format ( 'YYYY-MM-DD' ) ,
509517 } ) ;
510-
511-
512518} ) ;
0 commit comments