@@ -10,8 +10,7 @@ import {
10
10
ElementRef ,
11
11
AfterViewInit ,
12
12
ViewChildren ,
13
- QueryList ,
14
- AfterViewChecked
13
+ QueryList
15
14
} from '@angular/core' ;
16
15
import { NG_VALUE_ACCESSOR } from '@angular/forms' ;
17
16
import { fadeIn , scaleInCenter } from '../animations/main' ;
@@ -70,7 +69,7 @@ export interface IMonthView {
70
69
selector : 'igx-calendar' ,
71
70
templateUrl : 'calendar.component.html'
72
71
} )
73
- export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterViewInit , AfterViewChecked {
72
+ export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterViewInit {
74
73
/**
75
74
* Sets/gets the `id` of the calendar.
76
75
* If not set, the `id` will have value `"igx-calendar-0"`.
@@ -388,15 +387,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterVie
388
387
} ) ;
389
388
}
390
389
391
- public ngAfterViewChecked ( ) {
392
- this . monthViews . forEach ( ( item , index ) => {
393
- const prevMonthView = this . getMonthView ( index - 1 ) ;
394
- const nextMonthView = this . getMonthView ( index + 1 ) ;
395
- item . nextMonthView = nextMonthView ;
396
- item . prevMonthView = prevMonthView ;
397
- } ) ;
398
- }
399
-
400
390
/**
401
391
* Returns the locale representation of the month in the month view if enabled,
402
392
* otherwise returns the default `Date.getMonth()` value.
@@ -415,9 +405,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterVie
415
405
*/
416
406
public previousMonth ( isKeydownTrigger = false ) {
417
407
this . viewDate = this . calendarModel . timedelta ( this . viewDate , 'month' , - 1 ) ;
418
- // this.dayViews.forEach((val) => {
419
- // val.viewDate = this.calendarModel.timedelta(val.viewDate, 'month', -1);
420
- // });
421
408
this . _monthAction = 'prev' ;
422
409
423
410
if ( this . daysView ) {
@@ -430,9 +417,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterVie
430
417
*/
431
418
public nextMonth ( isKeydownTrigger = false ) {
432
419
this . viewDate = this . calendarModel . timedelta ( this . viewDate , 'month' , 1 ) ;
433
- // this.dayViews.forEach((val) => {
434
- // val.viewDate = this.calendarModel.timedelta(val.viewDate, 'month', 1);
435
- // });
436
420
this . _monthAction = 'next' ;
437
421
438
422
if ( this . daysView ) {
@@ -558,10 +542,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBase implements AfterVie
558
542
*/
559
543
public changeMonth ( event : Date ) {
560
544
this . viewDate = new Date ( this . viewDate . getFullYear ( ) , event . getMonth ( ) ) ;
561
- // this.dayViews.forEach((val, index) => {
562
- // // val.viewDate.setMonth(event.getMonth() + index);
563
- // val.viewDate = this.calendarModel.timedelta(val.viewDate, 'month', index);
564
- // });
565
545
566
546
this . activeView = CalendarView . DEFAULT ;
567
547
0 commit comments