Skip to content

Commit b450e49

Browse files
committed
Add spec for highlighting disabled dates
1 parent 770f63c commit b450e49

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/unit/specs/Datepicker.spec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,20 @@ describe('Datepicker highlight date', () => {
498498
expect(vm.isHighlightedDate(new Date(2016, 12, 5))).to.equal(false)
499499
})
500500

501+
it('should highlight a disabled date when explicitly configured to', () => {
502+
vm = getViewModel(Datepicker, {
503+
highlighted: {
504+
to: new Date(2016, 12, 8),
505+
from: new Date(2016, 12, 4),
506+
includeDisabled: true
507+
},
508+
disabled: {
509+
dates: [ new Date(2016, 12, 5) ]
510+
}
511+
})
512+
expect(vm.isHighlightedDate(new Date(2016, 12, 5))).to.equal(true)
513+
})
514+
501515
it('should highlight a date before the to property', () => {
502516
expect(vm.isHighlightedDate(new Date(2016, 12, 7))).to.equal(true)
503517
})

0 commit comments

Comments
 (0)