import { forwardRef , ChangeDetectionStrategy , ChangeDetectorRef , Component , ElementRef , Renderer2 , NgZone , OnInit } from '@angular/core' ; import { DateHelperService } from '../../../date-picker/date-helper.service' ; import { CalendarHeader , PanelSelector } from '../calendar/calendar-header.component' ; @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'month-header' , templateUrl : '../calendar/calendar-header.component.html' } ) export class MonthHeaderComponent extends CalendarHeader { constructor ( public dateHelper ) { super ( dateHelper ) ; } getSelectors ( ) { let yearFormat = 'yyyy年' ; return [ { className : `${ this . prefixCls }-month-btn` , onClick : ( ) => this . changePanel ( 'year' ) , label : this . formatDateTime ( yearFormat ) } ] ; } }