File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ module('Methods', {
4
4
. appendTo ( '#qunit-fixture' )
5
5
. datepicker ( { format : "dd-mm-yyyy" } ) ;
6
6
this . dp = this . input . data ( 'datepicker' ) ;
7
+ this . picker = this . dp . picker ;
7
8
} ,
8
9
teardown : function ( ) {
9
10
this . dp . remove ( ) ;
@@ -137,8 +138,11 @@ test('setDaysOfWeekDisabled - Array', function(){
137
138
} ) ;
138
139
139
140
test ( 'setDatesDisabled' , function ( ) {
140
- var returnedObject = this . dp . setDatesDisabled ( [ ] ) ;
141
- // ...
141
+ var monthShown = this . picker . find ( '.datepicker-days thead th.datepicker-switch' ) ;
142
+ var returnedObject = this . dp . setDatesDisabled ( [ '01-03-2011' ] ) ;
143
+ ok ( this . picker . find ( '.datepicker-days tbody td.day:not(.old):first' ) . hasClass ( 'disabled' ) , 'day is disabled' ) ;
144
+ this . dp . setDatesDisabled ( [ '01-01-2011' ] ) ;
145
+ equal ( monthShown . text ( ) , 'March 2011' , 'should not change viewDate' ) ;
142
146
strictEqual ( returnedObject , this . dp , "is chainable" ) ;
143
147
} ) ;
144
148
You can’t perform that action at this time.
0 commit comments