Skip to content

Commit

Permalink
fix(datepicker): replace not-allowed cursor with default one
Browse files Browse the repository at this point in the history
Closes #850
  • Loading branch information
maxokorokov authored and pkozlowski-opensource committed Oct 7, 2016
1 parent afe6342 commit 807c7e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/datepicker/datepicker-month-view.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('ngbDatepickerMonthView', () => {
}

if (!isBrowser('ie9')) {
it('should set not-allowed cursor for disabled dates', () => {
it('should set default cursor for disabled dates', () => {
const fixture = createTestComponent(`
<template #tpl let-date="date">{{ date.day }}</template>
<table><tbody ngbDatepickerMonthView [month]="month" [dayTemplate]="tpl"
Expand All @@ -148,10 +148,10 @@ describe('ngbDatepickerMonthView', () => {
fixture.detectChanges();

const dates = getDates(fixture.nativeElement);
expect(window.getComputedStyle(dates[0]).getPropertyValue('cursor')).toBe('not-allowed');
expect(window.getComputedStyle(dates[0]).getPropertyValue('cursor')).toBe('default');
});

it('should set not-allowed cursor for all dates if disabled', () => {
it('should set default cursor for all dates if disabled', () => {
const fixture = createTestComponent(`
<template #tpl let-date="date">{{ date.day }}</template>
<table><tbody ngbDatepickerMonthView [month]="month" [dayTemplate]="tpl"
Expand All @@ -161,7 +161,7 @@ describe('ngbDatepickerMonthView', () => {
fixture.detectChanges();

const dates = getDates(fixture.nativeElement);
dates.forEach((date) => expect(window.getComputedStyle(date).getPropertyValue('cursor')).toBe('not-allowed'));
dates.forEach((date) => expect(window.getComputedStyle(date).getPropertyValue('cursor')).toBe('default'));
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/datepicker/datepicker-month-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {DayTemplateContext} from './datepicker-day-template-context';
cursor: pointer;
}
.day.disabled {
cursor: not-allowed;
cursor: default;
}
`],
template: `
Expand Down

0 comments on commit 807c7e7

Please sign in to comment.