31
31
}
32
32
} ( function ( $ ) {
33
33
34
- var widget ,
35
- calendarOptions = [ "buttons" , "dateFormat" , "disabled" , "eachDay" , "max" , "min" , "numberOfMonths" , "showWeek" ] ;
36
-
37
- widget = $ . widget ( "ui.datepicker" , {
34
+ var widget = $ . widget ( "ui.datepicker" , {
38
35
version : "@VERSION" ,
39
36
options : {
40
37
appendTo : null ,
@@ -52,6 +49,9 @@ widget = $.widget( "ui.datepicker", {
52
49
select : null
53
50
} ,
54
51
52
+ calendarOptions : [ "buttons" , "dateFormat" , "disabled" , "eachDay" , "max" ,
53
+ "min" , "numberOfMonths" , "showWeek" ] ,
54
+
55
55
_create : function ( ) {
56
56
this . suppressExpandOnFocus = false ;
57
57
this . _createCalendar ( ) ;
@@ -312,7 +312,7 @@ widget = $.widget( "ui.datepicker", {
312
312
_setOption : function ( key , value ) {
313
313
this . _super ( key , value ) ;
314
314
315
- if ( $ . inArray ( key , calendarOptions ) !== - 1 ) {
315
+ if ( $ . inArray ( key , this . calendarOptions ) !== - 1 ) {
316
316
this . calendarInstance . option ( key , value ) ;
317
317
}
318
318
@@ -341,7 +341,7 @@ widget = $.widget( "ui.datepicker", {
341
341
}
342
342
} ) ;
343
343
344
- $ . each ( calendarOptions , function ( index , option ) {
344
+ $ . each ( $ . ui . datepicker . prototype . calendarOptions , function ( index , option ) {
345
345
$ . ui . datepicker . prototype . options [ option ] = $ . ui . calendar . prototype . options [ option ] ;
346
346
} ) ;
347
347
0 commit comments