26
26
}
27
27
} ( function ( $ ) {
28
28
29
- var widget ,
30
- calendarOptions = [ "buttons" , "dateFormat" , "disabled" , "eachDay" , "max" , "min" , "numberOfMonths" , "showWeek" ] ;
31
-
32
- widget = $ . widget ( "ui.datepicker" , {
29
+ var widget = $ . widget ( "ui.datepicker" , {
33
30
version : "@VERSION" ,
34
31
options : {
35
32
appendTo : null ,
@@ -47,6 +44,8 @@ widget = $.widget( "ui.datepicker", {
47
44
select : null
48
45
} ,
49
46
47
+ calendarOptions : [ "buttons" , "dateFormat" , "disabled" , "eachDay" , "max" , "min" , "numberOfMonths" , "showWeek" ] ,
48
+
50
49
_create : function ( ) {
51
50
this . suppressExpandOnFocus = false ;
52
51
this . _createCalendar ( ) ;
@@ -307,7 +306,7 @@ widget = $.widget( "ui.datepicker", {
307
306
_setOption : function ( key , value ) {
308
307
this . _super ( key , value ) ;
309
308
310
- if ( $ . inArray ( key , calendarOptions ) !== - 1 ) {
309
+ if ( $ . inArray ( key , this . calendarOptions ) !== - 1 ) {
311
310
this . calendarInstance . option ( key , value ) ;
312
311
}
313
312
@@ -336,7 +335,7 @@ widget = $.widget( "ui.datepicker", {
336
335
}
337
336
} ) ;
338
337
339
- $ . each ( calendarOptions , function ( index , option ) {
338
+ $ . each ( $ . ui . datepicker . prototype . calendarOptions , function ( index , option ) {
340
339
$ . ui . datepicker . prototype . options [ option ] = $ . ui . calendar . prototype . options [ option ] ;
341
340
} ) ;
342
341
0 commit comments