Skip to content

Commit 9013d4a

Browse files
committed
Added test for option daysOfWeekDisabled
1 parent 658bcf9 commit 9013d4a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/suites/options.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,24 @@ test('Today Highlight: today\'s date is highlighted when not active', patch_date
262262
ok(!target.hasClass('today'), 'Tomorrow is not marked with "today" class');
263263
}));
264264

265+
test('DaysOfWeekDisabled', function(){
266+
var input = $('<input />')
267+
.appendTo('#qunit-fixture')
268+
.val('2012-10-26')
269+
.datepicker({
270+
format: 'yyyy-mm-dd',
271+
daysOfWeekDisabled: '1,5'
272+
}),
273+
dp = input.data('datepicker'),
274+
picker = dp.picker,
275+
target;
276+
277+
278+
input.focus();
279+
target = picker.find('.datepicker-days tbody td:nth(22)');
280+
ok(target.hasClass('disabled'), 'Day of week is disabled');
281+
target = picker.find('.datepicker-days tbody td:nth(24)');
282+
ok(!target.hasClass('disabled'), 'Day of week is enabled');
283+
target = picker.find('.datepicker-days tbody td:nth(26)');
284+
ok(target.hasClass('disabled'), 'Day of week is disabled');
285+
});

0 commit comments

Comments
 (0)