File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,16 @@ test('baseStructure', function() {
116
116
ok ( child . is ( 'div.ui-datepicker-group' ) && child . is ( 'div.ui-datepicker-group-last' ) , 'Structure multi [2] - second month division' ) ;
117
117
child = dp . children ( ':eq(2)' ) ;
118
118
ok ( child . is ( 'div.ui-datepicker-row-break' ) , 'Structure multi [2] - row break' ) ;
119
+ ok ( dp . is ( '.ui-datepicker-multi-2' ) , 'Structure multi [2] - multi-2' ) ;
119
120
inp . datepicker ( 'hide' ) . datepicker ( 'destroy' ) ;
120
121
122
+ // Multi-month 3
123
+ inp = init ( '#inp' , { numberOfMonths : 3 } ) ;
124
+ inp . focus ( ) ;
125
+ ok ( dp . is ( '.ui-datepicker-multi-3' ) , 'Structure multi [3] - multi-3' ) ;
126
+ ok ( ! dp . is ( '.ui-datepicker-multi-2' ) , 'Structure multi [3] - Trac #6704' ) ;
127
+ inp . datepicker ( 'hide' ) . datepicker ( 'destroy' ) ;
128
+
121
129
// Multi-month [2, 2]
122
130
inp = init ( '#inp' , { numberOfMonths : [ 2 , 2 ] } ) ;
123
131
inp . focus ( ) ;
Original file line number Diff line number Diff line change @@ -685,10 +685,9 @@ $.extend(Datepicker.prototype, {
685
685
var numMonths = this . _getNumberOfMonths ( inst ) ;
686
686
var cols = numMonths [ 1 ] ;
687
687
var width = 17 ;
688
+ inst . dpDiv . removeClass ( 'ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4' ) . width ( '' ) ;
688
689
if ( cols > 1 )
689
690
inst . dpDiv . addClass ( 'ui-datepicker-multi-' + cols ) . css ( 'width' , ( width * cols ) + 'em' ) ;
690
- else
691
- inst . dpDiv . removeClass ( 'ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4' ) . width ( '' ) ;
692
691
inst . dpDiv [ ( numMonths [ 0 ] != 1 || numMonths [ 1 ] != 1 ? 'add' : 'remove' ) +
693
692
'Class' ] ( 'ui-datepicker-multi' ) ;
694
693
inst . dpDiv [ ( this . _get ( inst , 'isRTL' ) ? 'add' : 'remove' ) +
You can’t perform that action at this time.
0 commit comments