Skip to content

Commit e36bea7

Browse files
committed
fix(calendar): dont recalculate next date #4282
1 parent 644d6e8 commit e36bea7

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

projects/igniteui-angular/src/lib/calendar/calendar.component.spec.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,6 @@ describe('IgxCalendar', () => {
10401040

10411041
selectedDates.forEach(d => {
10421042
expect(d.selected).toBe(true);
1043-
expect(d.isSelectedCSS).toBe(true);
10441043
});
10451044

10461045
const notSelectedDates = calendar.daysView.dates.toArray().filter(d => {
@@ -1051,7 +1050,6 @@ describe('IgxCalendar', () => {
10511050

10521051
notSelectedDates.forEach(d => {
10531052
expect(d.selected).toBe(false);
1054-
expect(d.isSelectedCSS).toBe(false);
10551053
});
10561054
});
10571055
});

projects/igniteui-angular/src/lib/calendar/days-view/days-view.component.ts

-12
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,6 @@ export class IgxDaysViewComponent extends IgxCalendarBase implements DoCheck {
382382

383383
if (!this.isDayFocusable(day)) {
384384
day = dates[i - 7];
385-
if (!day) {
386-
this.nextDate = this.calendarModel.timedelta(this.nextDate, 'day', -7);
387-
}
388385
}
389386

390387
// focus item in next month, which is currently out of view
@@ -442,9 +439,6 @@ export class IgxDaysViewComponent extends IgxCalendarBase implements DoCheck {
442439

443440
if (!this.isDayFocusable(day)) {
444441
day = dates[i + 7];
445-
if (!day) {
446-
this.nextDate = this.calendarModel.timedelta(this.nextDate, 'day', 7);
447-
}
448442

449443
}
450444

@@ -504,9 +498,6 @@ export class IgxDaysViewComponent extends IgxCalendarBase implements DoCheck {
504498

505499
if (!this.isDayFocusable(day)) {
506500
day = dates[i - 1];
507-
if (!day) {
508-
this.nextDate = this.calendarModel.timedelta(this.nextDate, 'day', -1);
509-
}
510501
}
511502

512503
// focus item in previous month, which is currently out of view
@@ -565,9 +556,6 @@ export class IgxDaysViewComponent extends IgxCalendarBase implements DoCheck {
565556

566557
if (!this.isDayFocusable(day)) {
567558
day = dates[i + 1];
568-
if (!day) {
569-
this.nextDate = this.calendarModel.timedelta(this.nextDate, 'day', 1);
570-
}
571559
}
572560

573561
// focus item in next month, which is currently out of view

0 commit comments

Comments
 (0)