blob: 2ca3dee6b78a68e5a03ceb25c3e72d89c698a35a [file] [log] [blame]
{"version":3,"file":"datepicker.es5.js","sources":["../../../src/material/datepicker/datepicker-module.ts","../../../src/material/datepicker/datepicker-toggle.ts","../../../src/material/datepicker/datepicker-input.ts","../../../src/material/datepicker/datepicker.ts","../../../src/material/datepicker/datepicker-animations.ts","../../../src/material/datepicker/calendar.ts","../../../src/material/datepicker/year-view.ts","../../../src/material/datepicker/multi-year-view.ts","../../../src/material/datepicker/month-view.ts","../../../src/material/datepicker/calendar-body.ts","../../../src/material/datepicker/datepicker-intl.ts","../../../src/material/datepicker/datepicker-errors.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatCalendar, MatCalendarHeader} from './calendar';\nimport {MatCalendarBody} from './calendar-body';\nimport {\n MatDatepicker,\n MatDatepickerContent,\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './datepicker';\nimport {MatDatepickerInput} from './datepicker-input';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatDatepickerToggle, MatDatepickerToggleIcon} from './datepicker-toggle';\nimport {MatMonthView} from './month-view';\nimport {MatMultiYearView} from './multi-year-view';\nimport {MatYearView} from './year-view';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatDialogModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n ],\n exports: [\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n ],\n declarations: [\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n ],\n providers: [\n MatDatepickerIntl,\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n ],\n entryComponents: [\n MatDatepickerContent,\n MatCalendarHeader,\n ]\n})\nexport class MatDatepickerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n Directive,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n ViewEncapsulation,\n ViewChild,\n} from '@angular/core';\nimport {MatButton} from '@angular/material/button';\nimport {merge, of as observableOf, Subscription} from 'rxjs';\nimport {MatDatepicker} from './datepicker';\nimport {MatDatepickerIntl} from './datepicker-intl';\n\n\n/** Can be used to override the icon of a `matDatepickerToggle`. */\n@Directive({\n selector: '[matDatepickerToggleIcon]'\n})\nexport class MatDatepickerToggleIcon {}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker-toggle',\n templateUrl: 'datepicker-toggle.html',\n styleUrls: ['datepicker-toggle.css'],\n host: {\n 'class': 'mat-datepicker-toggle',\n // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the\n // consumer may have provided, while still being able to receive focus.\n '[attr.tabindex]': '-1',\n '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',\n '[class.mat-accent]': 'datepicker && datepicker.color === \"accent\"',\n '[class.mat-warn]': 'datepicker && datepicker.color === \"warn\"',\n '(focus)': '_button.focus()',\n },\n exportAs: 'matDatepickerToggle',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {\n private _stateChanges = Subscription.EMPTY;\n\n /** Datepicker instance that the button will toggle. */\n @Input('for') datepicker: MatDatepicker<D>;\n\n /** Tabindex for the toggle. */\n @Input() tabIndex: number | null;\n\n /** Whether the toggle button is disabled. */\n @Input()\n get disabled(): boolean {\n if (this._disabled === undefined && this.datepicker) {\n return this.datepicker.disabled;\n }\n\n return !!this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean;\n\n /** Whether ripples on the toggle should be disabled. */\n @Input() disableRipple: boolean;\n\n /** Custom icon set by the consumer. */\n @ContentChild(MatDatepickerToggleIcon, {static: false}) _customIcon: MatDatepickerToggleIcon;\n\n /** Underlying button element. */\n @ViewChild('button', {static: false}) _button: MatButton;\n\n constructor(\n public _intl: MatDatepickerIntl,\n private _changeDetectorRef: ChangeDetectorRef,\n @Attribute('tabindex') defaultTabIndex: string) {\n\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['datepicker']) {\n this._watchStateChanges();\n }\n }\n\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n\n _open(event: Event): void {\n if (this.datepicker && !this.disabled) {\n this.datepicker.open();\n event.stopPropagation();\n }\n }\n\n private _watchStateChanges() {\n const datepickerDisabled = this.datepicker ? this.datepicker._disabledChange : observableOf();\n const inputDisabled = this.datepicker && this.datepicker._datepickerInput ?\n this.datepicker._datepickerInput._disabledChange : observableOf();\n const datepickerToggled = this.datepicker ?\n merge(this.datepicker.openedStream, this.datepicker.closedStream) :\n observableOf();\n\n this._stateChanges.unsubscribe();\n this._stateChanges = merge(\n this._intl.changes,\n datepickerDisabled,\n inputDisabled,\n datepickerToggled\n ).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW} from '@angular/cdk/keycodes';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Output,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats, ThemePalette} from '@angular/material/core';\nimport {MatFormField} from '@angular/material/form-field';\nimport {MAT_INPUT_VALUE_ACCESSOR} from '@angular/material/input';\nimport {Subscription} from 'rxjs';\nimport {MatDatepicker} from './datepicker';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true\n};\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALIDATORS: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true\n};\n\n\n/**\n * An event used for datepicker input and change events. We don't always have access to a native\n * input or change event because the event may have been triggered by the user clicking on the\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\n */\nexport class MatDatepickerInputEvent<D> {\n /** The new value for the target datepicker input. */\n value: D | null;\n\n constructor(\n /** Reference to the datepicker input component that emitted the event. */\n public target: MatDatepickerInput<D>,\n /** Reference to the native input element associated with the datepicker input. */\n public targetElement: HTMLElement) {\n this.value = this.target.value;\n }\n}\n\n\n/** Directive used to connect an input to a MatDatepicker. */\n@Directive({\n selector: 'input[matDatepicker]',\n providers: [\n MAT_DATEPICKER_VALUE_ACCESSOR,\n MAT_DATEPICKER_VALIDATORS,\n {provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput},\n ],\n host: {\n 'aria-haspopup': 'dialog',\n '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',\n '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',\n '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'matDatepickerInput',\n})\nexport class MatDatepickerInput<D> implements ControlValueAccessor, OnDestroy, Validator {\n /** The datepicker that this input is associated with. */\n @Input()\n set matDatepicker(value: MatDatepicker<D>) {\n if (!value) {\n return;\n }\n\n this._datepicker = value;\n this._datepicker._registerInput(this);\n this._datepickerSubscription.unsubscribe();\n\n this._datepickerSubscription = this._datepicker._selectedChanged.subscribe((selected: D) => {\n this.value = selected;\n this._cvaOnChange(selected);\n this._onTouched();\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n });\n }\n _datepicker: MatDatepicker<D>;\n\n /** Function that can be used to filter out dates within the datepicker. */\n @Input()\n set matDatepickerFilter(value: (date: D | null) => boolean) {\n this._dateFilter = value;\n this._validatorOnChange();\n }\n _dateFilter: (date: D | null) => boolean;\n\n /** The value of the input. */\n @Input()\n get value(): D | null { return this._value; }\n set value(value: D | null) {\n value = this._dateAdapter.deserialize(value);\n this._lastValueValid = !value || this._dateAdapter.isValid(value);\n value = this._getValidDateOrNull(value);\n const oldDate = this.value;\n this._value = value;\n this._formatValue(value);\n\n if (!this._dateAdapter.sameDate(oldDate, value)) {\n this._valueChange.emit(value);\n }\n }\n private _value: D | null;\n\n /** The minimum valid date. */\n @Input()\n get min(): D | null { return this._min; }\n set min(value: D | null) {\n this._min = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._validatorOnChange();\n }\n private _min: D | null;\n\n /** The maximum valid date. */\n @Input()\n get max(): D | null { return this._max; }\n set max(value: D | null) {\n this._max = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._validatorOnChange();\n }\n private _max: D | null;\n\n /** Whether the datepicker-input is disabled. */\n @Input()\n get disabled(): boolean { return !!this._disabled; }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n const element = this._elementRef.nativeElement;\n\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this._disabledChange.emit(newValue);\n }\n\n // We need to null check the `blur` method, because it's undefined during SSR.\n if (newValue && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n private _disabled: boolean;\n\n /** Emits when a `change` event is fired on this `<input>`. */\n @Output() readonly dateChange: EventEmitter<MatDatepickerInputEvent<D>> =\n new EventEmitter<MatDatepickerInputEvent<D>>();\n\n /** Emits when an `input` event is fired on this `<input>`. */\n @Output() readonly dateInput: EventEmitter<MatDatepickerInputEvent<D>> =\n new EventEmitter<MatDatepickerInputEvent<D>>();\n\n /** Emits when the value changes (either due to user input or programmatic change). */\n _valueChange = new EventEmitter<D | null>();\n\n /** Emits when the disabled state has changed */\n _disabledChange = new EventEmitter<boolean>();\n\n _onTouched = () => {};\n\n private _cvaOnChange: (value: any) => void = () => {};\n\n private _validatorOnChange = () => {};\n\n private _datepickerSubscription = Subscription.EMPTY;\n\n private _localeSubscription = Subscription.EMPTY;\n\n /** The form control validator for whether the input parses. */\n private _parseValidator: ValidatorFn = (): ValidationErrors | null => {\n return this._lastValueValid ?\n null : {'matDatepickerParse': {'text': this._elementRef.nativeElement.value}};\n }\n\n /** The form control validator for the min date. */\n private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return (!this.min || !controlValue ||\n this._dateAdapter.compareDate(this.min, controlValue) <= 0) ?\n null : {'matDatepickerMin': {'min': this.min, 'actual': controlValue}};\n }\n\n /** The form control validator for the max date. */\n private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return (!this.max || !controlValue ||\n this._dateAdapter.compareDate(this.max, controlValue) >= 0) ?\n null : {'matDatepickerMax': {'max': this.max, 'actual': controlValue}};\n }\n\n /** The form control validator for the date filter. */\n private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return !this._dateFilter || !controlValue || this._dateFilter(controlValue) ?\n null : {'matDatepickerFilter': true};\n }\n\n /** The combined form control validator for this input. */\n private _validator: ValidatorFn | null =\n Validators.compose(\n [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);\n\n /** Whether the last value set on the input was valid. */\n private _lastValueValid = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLInputElement>,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() private _formField: MatFormField) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n // Update the displayed date when the locale changes.\n this._localeSubscription = _dateAdapter.localeChanges.subscribe(() => {\n this.value = this.value;\n });\n }\n\n ngOnDestroy() {\n this._datepickerSubscription.unsubscribe();\n this._localeSubscription.unsubscribe();\n this._valueChange.complete();\n this._disabledChange.complete();\n }\n\n /** @docs-private */\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n /** @docs-private */\n validate(c: AbstractControl): ValidationErrors | null {\n return this._validator ? this._validator(c) : null;\n }\n\n /**\n * @deprecated\n * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead\n */\n getPopupConnectionElementRef(): ElementRef {\n return this.getConnectedOverlayOrigin();\n }\n\n /**\n * Gets the element that the datepicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: D): void {\n this.value = value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void): void {\n this._cvaOnChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _onKeydown(event: KeyboardEvent) {\n const isAltDownArrow = event.altKey && event.keyCode === DOWN_ARROW;\n\n if (this._datepicker && isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._datepicker.open();\n event.preventDefault();\n }\n }\n\n _onInput(value: string) {\n let date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);\n this._lastValueValid = !date || this._dateAdapter.isValid(date);\n date = this._getValidDateOrNull(date);\n\n if (!this._dateAdapter.sameDate(date, this._value)) {\n this._value = date;\n this._cvaOnChange(date);\n this._valueChange.emit(date);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n } else {\n this._validatorOnChange();\n }\n }\n\n _onChange() {\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n\n /** Returns the palette used by the input's form field, if any. */\n _getThemePalette(): ThemePalette {\n return this._formField ? this._formField.color : undefined;\n }\n\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n\n this._onTouched();\n }\n\n /** Formats a value and sets it on the input element. */\n private _formatValue(value: D | null) {\n this._elementRef.nativeElement.value =\n value ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ESCAPE, UP_ARROW} from '@angular/cdk/keycodes';\nimport {\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType} from '@angular/cdk/portal';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n CanColor,\n CanColorCtor,\n DateAdapter,\n mixinColor,\n ThemePalette,\n} from '@angular/material/core';\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\nimport {merge, Subject, Subscription} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatCalendar} from './calendar';\nimport {matDatepickerAnimations} from './datepicker-animations';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatDatepickerInput} from './datepicker-input';\nimport {MatCalendarCellCssClasses} from './calendar-body';\n\n/** Used to generate a unique ID for each datepicker instance. */\nlet datepickerUid = 0;\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-datepicker-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_DATEPICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,\n};\n\n// Boilerplate for applying mixins to MatDatepickerContent.\n/** @docs-private */\nclass MatDatepickerContentBase {\n constructor(public _elementRef: ElementRef) { }\n}\nconst _MatDatepickerContentMixinBase: CanColorCtor & typeof MatDatepickerContentBase =\n mixinColor(MatDatepickerContentBase);\n\n/**\n * Component used as the content for the datepicker dialog and popup. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the popup that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker-content',\n templateUrl: 'datepicker-content.html',\n styleUrls: ['datepicker-content.css'],\n host: {\n 'class': 'mat-datepicker-content',\n '[@transformPanel]': '\"enter\"',\n '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',\n },\n animations: [\n matDatepickerAnimations.transformPanel,\n matDatepickerAnimations.fadeInCalendar,\n ],\n exportAs: 'matDatepickerContent',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color'],\n})\nexport class MatDatepickerContent<D> extends _MatDatepickerContentMixinBase\n implements AfterViewInit, CanColor {\n\n /** Reference to the internal calendar component. */\n @ViewChild(MatCalendar, {static: false}) _calendar: MatCalendar<D>;\n\n /** Reference to the datepicker that created the overlay. */\n datepicker: MatDatepicker<D>;\n\n /** Whether the datepicker is above or below the input. */\n _isAbove: boolean;\n\n constructor(elementRef: ElementRef) {\n super(elementRef);\n }\n\n ngAfterViewInit() {\n this._calendar.focusActiveCell();\n }\n}\n\n\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDatepicker\"). We can change this to a directive\n// if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the datepicker popup/dialog. */\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker',\n template: '',\n exportAs: 'matDatepicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatDatepicker<D> implements OnDestroy, CanColor {\n private _scrollStrategy: () => ScrollStrategy;\n\n /** An input indicating the type of the custom header component for the calendar, if set. */\n @Input() calendarHeaderComponent: ComponentType<any>;\n\n /** The date to open the calendar to initially. */\n @Input()\n get startAt(): D | null {\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\n // selected value is.\n return this._startAt || (this._datepickerInput ? this._datepickerInput.value : null);\n }\n set startAt(value: D | null) {\n this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** The view that the calendar should start in. */\n @Input() startView: 'month' | 'year' | 'multi-year' = 'month';\n\n /** Color palette to use on the datepicker's calendar. */\n @Input()\n get color(): ThemePalette {\n return this._color ||\n (this._datepickerInput ? this._datepickerInput._getThemePalette() : undefined);\n }\n set color(value: ThemePalette) {\n this._color = value;\n }\n _color: ThemePalette;\n\n /**\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n * than a popup and elements have more padding to allow for bigger touch targets.\n */\n @Input()\n get touchUi(): boolean { return this._touchUi; }\n set touchUi(value: boolean) {\n this._touchUi = coerceBooleanProperty(value);\n }\n private _touchUi = false;\n\n /** Whether the datepicker pop-up should be disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled === undefined && this._datepickerInput ?\n this._datepickerInput.disabled : !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._disabledChange.next(newValue);\n }\n }\n private _disabled: boolean;\n\n /**\n * Emits selected year in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits selected month in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */\n @Input() panelClass: string | string[];\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when the datepicker has been opened. */\n @Output('opened') openedStream: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when the datepicker has been closed. */\n @Output('closed') closedStream: EventEmitter<void> = new EventEmitter<void>();\n\n\n /** Whether the calendar is open. */\n @Input()\n get opened(): boolean { return this._opened; }\n set opened(value: boolean) { value ? this.open() : this.close(); }\n private _opened = false;\n\n /** The id for the datepicker calendar. */\n id: string = `mat-datepicker-${datepickerUid++}`;\n\n /** The currently selected date. */\n get _selected(): D | null { return this._validSelected; }\n set _selected(value: D | null) { this._validSelected = value; }\n private _validSelected: D | null = null;\n\n /** The minimum selectable date. */\n get _minDate(): D | null {\n return this._datepickerInput && this._datepickerInput.min;\n }\n\n /** The maximum selectable date. */\n get _maxDate(): D | null {\n return this._datepickerInput && this._datepickerInput.max;\n }\n\n get _dateFilter(): (date: D | null) => boolean {\n return this._datepickerInput && this._datepickerInput._dateFilter;\n }\n\n /** A reference to the overlay when the calendar is opened as a popup. */\n _popupRef: OverlayRef;\n\n /** A reference to the dialog when the calendar is opened as a dialog. */\n private _dialogRef: MatDialogRef<MatDatepickerContent<D>> | null;\n\n /** A portal containing the calendar for this datepicker. */\n private _calendarPortal: ComponentPortal<MatDatepickerContent<D>>;\n\n /** Reference to the component instantiated in popup mode. */\n private _popupComponentRef: ComponentRef<MatDatepickerContent<D>> | null;\n\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen: HTMLElement | null = null;\n\n /** Subscription to value changes in the associated input element. */\n private _inputSubscription = Subscription.EMPTY;\n\n /** The input element this datepicker is associated with. */\n _datepickerInput: MatDatepickerInput<D>;\n\n /** Emits when the datepicker is disabled. */\n readonly _disabledChange = new Subject<boolean>();\n\n /** Emits new selected date when selected date changes. */\n readonly _selectedChanged = new Subject<D>();\n\n constructor(private _dialog: MatDialog,\n private _overlay: Overlay,\n private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n @Inject(MAT_DATEPICKER_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(DOCUMENT) private _document: any) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._scrollStrategy = scrollStrategy;\n }\n\n ngOnDestroy() {\n this.close();\n this._inputSubscription.unsubscribe();\n this._disabledChange.complete();\n\n if (this._popupRef) {\n this._popupRef.dispose();\n this._popupComponentRef = null;\n }\n }\n\n /** Selects the given date */\n select(date: D): void {\n let oldValue = this._selected;\n this._selected = date;\n if (!this._dateAdapter.sameDate(oldValue, this._selected)) {\n this._selectedChanged.next(date);\n }\n }\n\n /** Emits the selected year in multiyear view */\n _selectYear(normalizedYear: D): void {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Emits selected month in year view */\n _selectMonth(normalizedMonth: D): void {\n this.monthSelected.emit(normalizedMonth);\n }\n\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n */\n _registerInput(input: MatDatepickerInput<D>): void {\n if (this._datepickerInput) {\n throw Error('A MatDatepicker can only be associated with a single input.');\n }\n this._datepickerInput = input;\n this._inputSubscription =\n this._datepickerInput._valueChange.subscribe((value: D | null) => this._selected = value);\n }\n\n /** Open the calendar. */\n open(): void {\n if (this._opened || this.disabled) {\n return;\n }\n if (!this._datepickerInput) {\n throw Error('Attempted to open an MatDatepicker with no associated input.');\n }\n if (this._document) {\n this._focusedElementBeforeOpen = this._document.activeElement;\n }\n\n this.touchUi ? this._openAsDialog() : this._openAsPopup();\n this._opened = true;\n this.openedStream.emit();\n }\n\n /** Close the calendar. */\n close(): void {\n if (!this._opened) {\n return;\n }\n if (this._popupRef && this._popupRef.hasAttached()) {\n this._popupRef.detach();\n }\n if (this._dialogRef) {\n this._dialogRef.close();\n this._dialogRef = null;\n }\n if (this._calendarPortal && this._calendarPortal.isAttached) {\n this._calendarPortal.detach();\n }\n\n const completeClose = () => {\n // The `_opened` could've been reset already if\n // we got two events in quick succession.\n if (this._opened) {\n this._opened = false;\n this.closedStream.emit();\n this._focusedElementBeforeOpen = null;\n }\n };\n\n if (this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function') {\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\n // marked the datepicker as closed. If the event fires out of sequence and the element that\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\n // able to close the calendar at all. We work around it by making the logic, that marks\n // the datepicker as closed, async as well.\n this._focusedElementBeforeOpen.focus();\n setTimeout(completeClose);\n } else {\n completeClose();\n }\n }\n\n /** Open the calendar as a dialog. */\n private _openAsDialog(): void {\n // Usually this would be handled by `open` which ensures that we can only have one overlay\n // open at a time, however since we reset the variables in async handlers some overlays\n // may slip through if the user opens and closes multiple times in quick succession (e.g.\n // by holding down the enter key).\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n\n this._dialogRef = this._dialog.open<MatDatepickerContent<D>>(MatDatepickerContent, {\n direction: this._dir ? this._dir.value : 'ltr',\n viewContainerRef: this._viewContainerRef,\n panelClass: 'mat-datepicker-dialog',\n });\n\n this._dialogRef.afterClosed().subscribe(() => this.close());\n this._dialogRef.componentInstance.datepicker = this;\n this._setColor();\n }\n\n /** Open the calendar as a popup. */\n private _openAsPopup(): void {\n if (!this._calendarPortal) {\n this._calendarPortal = new ComponentPortal<MatDatepickerContent<D>>(MatDatepickerContent,\n this._viewContainerRef);\n }\n\n if (!this._popupRef) {\n this._createPopup();\n }\n\n if (!this._popupRef.hasAttached()) {\n this._popupComponentRef = this._popupRef.attach(this._calendarPortal);\n this._popupComponentRef.instance.datepicker = this;\n this._setColor();\n\n // Update the position once the calendar has rendered.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n this._popupRef.updatePosition();\n });\n }\n }\n\n /** Create the popup. */\n private _createPopup(): void {\n const overlayConfig = new OverlayConfig({\n positionStrategy: this._createPopupPositionStrategy(),\n hasBackdrop: true,\n backdropClass: 'mat-overlay-transparent-backdrop',\n direction: this._dir,\n scrollStrategy: this._scrollStrategy(),\n panelClass: 'mat-datepicker-popup',\n });\n\n this._popupRef = this._overlay.create(overlayConfig);\n this._popupRef.overlayElement.setAttribute('role', 'dialog');\n\n merge(\n this._popupRef.backdropClick(),\n this._popupRef.detachments(),\n this._popupRef.keydownEvents().pipe(filter(event => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return event.keyCode === ESCAPE ||\n (this._datepickerInput && event.altKey && event.keyCode === UP_ARROW);\n }))\n ).subscribe(event => {\n if (event) {\n event.preventDefault();\n }\n\n this.close();\n });\n }\n\n /** Create the popup PositionStrategy. */\n private _createPopupPositionStrategy(): PositionStrategy {\n return this._overlay.position()\n .flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())\n .withTransformOriginOn('.mat-datepicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition()\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n ]);\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Passes the current theme color along to the calendar overlay. */\n private _setColor(): void {\n const color = this.color;\n if (this._popupComponentRef) {\n this._popupComponentRef.instance.color = color;\n }\n if (this._dialogRef) {\n this._dialogRef.componentInstance.color = color;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the Material datepicker.\n * @docs-private\n */\nexport const matDatepickerAnimations: {\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInCalendar: AnimationTriggerMetadata;\n} = {\n /** Transforms the height of the datepicker's calendar. */\n transformPanel: trigger('transformPanel', [\n state('void', style({\n opacity: 0,\n transform: 'scale(1, 0.8)'\n })),\n transition('void => enter', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({\n opacity: 1,\n transform: 'scale(1, 1)'\n }))),\n transition('* => void', animate('100ms linear', style({opacity: 0})))\n ]),\n\n /** Fades in the content of the calendar. */\n fadeInCalendar: trigger('fadeInCalendar', [\n state('void', style({opacity: 0})),\n state('enter', style({opacity: 1})),\n\n // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we\n // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.\n transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))\n ])\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal';\nimport {\n AfterContentInit,\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {MatCalendarCellCssClasses} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatMonthView} from './month-view';\nimport {\n getActiveOffset,\n isSameMultiYearView,\n MatMultiYearView,\n yearsPerPage\n} from './multi-year-view';\nimport {MatYearView} from './year-view';\n\n/**\n * Possible views for the calendar.\n * @docs-private\n */\nexport type MatCalendarView = 'month' | 'year' | 'multi-year';\n\n/** Default header for MatCalendar */\n@Component({\n moduleId: module.id,\n selector: 'mat-calendar-header',\n templateUrl: 'calendar-header.html',\n exportAs: 'matCalendarHeader',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendarHeader<D> {\n constructor(private _intl: MatDatepickerIntl,\n @Inject(forwardRef(() => MatCalendar)) public calendar: MatCalendar<D>,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n changeDetectorRef: ChangeDetectorRef) {\n\n this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());\n }\n\n /** The label for the current calendar view. */\n get periodButtonText(): string {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter\n .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);\n const minYearOfPage = activeYear - getActiveOffset(\n this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\n return `${minYearOfPage} \\u2013 ${maxYearOfPage}`;\n }\n\n get periodButtonLabel(): string {\n return this.calendar.currentView == 'month' ?\n this._intl.switchToMultiYearViewLabel : this._intl.switchToMonthViewLabel;\n }\n\n /** The label for the previous button. */\n get prevButtonLabel(): string {\n return {\n 'month': this._intl.prevMonthLabel,\n 'year': this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel\n }[this.calendar.currentView];\n }\n\n /** The label for the next button. */\n get nextButtonLabel(): string {\n return {\n 'month': this._intl.nextMonthLabel,\n 'year': this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel\n }[this.calendar.currentView];\n }\n\n /** Handles user clicks on the period label. */\n currentPeriodClicked(): void {\n this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n\n /** Handles user clicks on the previous button. */\n previousClicked(): void {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1) :\n this._dateAdapter.addCalendarYears(\n this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage\n );\n }\n\n /** Handles user clicks on the next button. */\n nextClicked(): void {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :\n this._dateAdapter.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? 1 : yearsPerPage\n );\n }\n\n /** Whether the previous period button is enabled. */\n previousEnabled(): boolean {\n if (!this.calendar.minDate) {\n return true;\n }\n return !this.calendar.minDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.minDate);\n }\n\n /** Whether the next period button is enabled. */\n nextEnabled(): boolean {\n return !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);\n }\n\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n private _isSameView(date1: D, date2: D): boolean {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(\n this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n }\n}\n\n/**\n * A calendar that is used as part of the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-calendar',\n templateUrl: 'calendar.html',\n styleUrls: ['calendar.css'],\n host: {\n 'class': 'mat-calendar',\n },\n exportAs: 'matCalendar',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {\n /** An input indicating the type of the header component, if set. */\n @Input() headerComponent: ComponentType<any>;\n\n /** A portal containing the header component type for this calendar. */\n _calendarHeaderPortal: Portal<any>;\n\n private _intlChanges: Subscription;\n\n /**\n * Used for scheduling that focus should be moved to the active cell on the next tick.\n * We need to schedule it, rather than do it immediately, because we have to wait\n * for Angular to re-evaluate the view children.\n */\n private _moveFocusOnNextTick = false;\n\n /** A date representing the period (month or year) to start the calendar in. */\n @Input()\n get startAt(): D | null { return this._startAt; }\n set startAt(value: D | null) {\n this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** Whether the calendar should be started in month or year view. */\n @Input() startView: MatCalendarView = 'month';\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when the currently selected date changes. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits the year chosen in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits the month chosen in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<void> = new EventEmitter<void>();\n\n /** Reference to the current month view component. */\n @ViewChild(MatMonthView, {static: false}) monthView: MatMonthView<D>;\n\n /** Reference to the current year view component. */\n @ViewChild(MatYearView, {static: false}) yearView: MatYearView<D>;\n\n /** Reference to the current multi-year view component. */\n @ViewChild(MatMultiYearView, {static: false}) multiYearView: MatMultiYearView<D>;\n\n /**\n * The current active date. This determines which time period is shown and which date is\n * highlighted when using keyboard navigation.\n */\n get activeDate(): D { return this._clampedActiveDate; }\n set activeDate(value: D) {\n this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);\n this.stateChanges.next();\n this._changeDetectorRef.markForCheck();\n }\n private _clampedActiveDate: D;\n\n /** Whether the calendar is in month view. */\n get currentView(): MatCalendarView { return this._currentView; }\n set currentView(value: MatCalendarView) {\n this._currentView = value;\n this._moveFocusOnNextTick = true;\n this._changeDetectorRef.markForCheck();\n }\n private _currentView: MatCalendarView;\n\n /**\n * Emits whenever there is a state change that the header may need to respond to.\n */\n stateChanges = new Subject<void>();\n\n constructor(_intl: MatDatepickerIntl,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n private _changeDetectorRef: ChangeDetectorRef) {\n\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n this._intlChanges = _intl.changes.subscribe(() => {\n _changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n }\n\n ngAfterContentInit() {\n this._calendarHeaderPortal = new ComponentPortal(this.headerComponent || MatCalendarHeader);\n this.activeDate = this.startAt || this._dateAdapter.today();\n\n // Assign to the private property since we don't want to move focus on init.\n this._currentView = this.startView;\n }\n\n ngAfterViewChecked() {\n if (this._moveFocusOnNextTick) {\n this._moveFocusOnNextTick = false;\n this.focusActiveCell();\n }\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n this.stateChanges.complete();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const change =\n changes['minDate'] || changes['maxDate'] || changes['dateFilter'];\n\n if (change && !change.firstChange) {\n const view = this._getCurrentViewComponent();\n\n if (view) {\n // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are\n // passed down to the view via data bindings which won't be up-to-date when we call `_init`.\n this._changeDetectorRef.detectChanges();\n view._init();\n }\n }\n\n this.stateChanges.next();\n }\n\n focusActiveCell() {\n this._getCurrentViewComponent()._focusActiveCell();\n }\n\n /** Updates today's date after an update of the active date */\n updateTodaysDate() {\n let view = this.currentView == 'month' ? this.monthView :\n (this.currentView == 'year' ? this.yearView : this.multiYearView);\n\n view.ngAfterContentInit();\n }\n\n /** Handles date selection in the month view. */\n _dateSelected(date: D): void {\n if (!this._dateAdapter.sameDate(date, this.selected)) {\n this.selectedChange.emit(date);\n }\n }\n\n /** Handles year selection in the multiyear view. */\n _yearSelectedInMultiYearView(normalizedYear: D) {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Handles month selection in the year view. */\n _monthSelectedInYearView(normalizedMonth: D) {\n this.monthSelected.emit(normalizedMonth);\n }\n\n _userSelected(): void {\n this._userSelection.emit();\n }\n\n /** Handles year/month selection in the multi-year/year views. */\n _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void {\n this.activeDate = date;\n this.currentView = view;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Returns the component instance that corresponds to the current calendar view. */\n private _getCurrentViewComponent() {\n return this.monthView || this.yearView || this.multiYearView;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n/**\n * An internal component used to display a single year in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-year-view',\n templateUrl: 'year-view.html',\n exportAs: 'matYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatYearView<D> implements AfterContentInit {\n /** The date to display in this year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedMonth = this._getMonthInCurrentYear(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Emits when a new month is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected month. This doesn't imply a change on the selected date */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the months of the year. */\n _months: MatCalendarCell[][];\n\n /** The label for this year (e.g. \"2017\"). */\n _yearLabel: string;\n\n /** The month in this year that today falls on. Null if today is in a different year. */\n _todayMonth: number | null;\n\n /**\n * The month in this year that the selected Date falls on.\n * Null if the selected Date is in a different year.\n */\n _selectedMonth: number | null;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Handles when a new month is selected. */\n _monthSelected(month: number) {\n const normalizedDate =\n this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n\n this.monthSelected.emit(normalizedDate);\n\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);\n\n this.selectedChange.emit(this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate), month,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));\n }\n\n /** Handles keydown events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate,\n -this._dateAdapter.getMonth(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate,\n 11 - this._dateAdapter.getMonth(this._activeDate));\n break;\n case PAGE_UP:\n this.activeDate =\n this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);\n break;\n case PAGE_DOWN:\n this.activeDate =\n this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);\n break;\n case ENTER:\n case SPACE:\n this._monthSelected(this._dateAdapter.getMonth(this._activeDate));\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Initializes this year view. */\n _init() {\n this._selectedMonth = this._getMonthInCurrentYear(this.selected);\n this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());\n this._yearLabel = this._dateAdapter.getYearName(this.activeDate);\n\n let monthNames = this._dateAdapter.getMonthNames('short');\n // First row of months only contains 5 elements so we can fit the year label on the same row.\n this._months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]].map(row => row.map(\n month => this._createCellForMonth(month, monthNames[month])));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /**\n * Gets the month in this year that the given Date falls on.\n * Returns null if the given Date is in another year.\n */\n private _getMonthInCurrentYear(date: D | null) {\n return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate) ?\n this._dateAdapter.getMonth(date) : null;\n }\n\n /** Creates an MatCalendarCell for the given month. */\n private _createCellForMonth(month: number, monthName: string) {\n let ariaLabel = this._dateAdapter.format(\n this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1),\n this._dateFormats.display.monthYearA11yLabel);\n return new MatCalendarCell(\n month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month));\n }\n\n /** Whether the given month is enabled. */\n private _shouldEnableMonth(month: number) {\n\n const activeYear = this._dateAdapter.getYear(this.activeDate);\n\n if (month === undefined || month === null ||\n this._isYearAndMonthAfterMaxDate(activeYear, month) ||\n this._isYearAndMonthBeforeMinDate(activeYear, month)) {\n return false;\n }\n\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);\n\n // If any date in the month is enabled count the month as enabled.\n for (let date = firstOfMonth; this._dateAdapter.getMonth(date) == month;\n date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is after this.maxDate, considering\n * just the month and year of this.maxDate\n */\n private _isYearAndMonthAfterMaxDate(year: number, month: number) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is before this.minDate, considering\n * just the month and year of this.minDate\n */\n private _isYearAndMonthBeforeMinDate(year: number, month: number) {\n if (this.minDate) {\n const minYear = this._dateAdapter.getYear(this.minDate);\n const minMonth = this._dateAdapter.getMonth(this.minDate);\n\n return year < minYear || (year === minYear && month < minMonth);\n }\n\n return false;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\nexport const yearsPerPage = 24;\n\nexport const yearsPerRow = 4;\n\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-multi-year-view',\n templateUrl: 'multi-year-view.html',\n exportAs: 'matMultiYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatMultiYearView<D> implements AfterContentInit {\n /** The date to display in this multi-year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n\n if (!isSameMultiYearView(\n this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedYear = this._selected && this._dateAdapter.getYear(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Emits when a new year is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected year. This doesn't imply a change on the selected date */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the currently displayed years. */\n _years: MatCalendarCell[][];\n\n /** The year that today falls on. */\n _todayYear: number;\n\n /** The year of the selected date. Null if the selected date is null. */\n _selectedYear: number | null;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Initializes this multi-year view. */\n _init() {\n this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());\n\n // We want a range years such that we maximize the number of\n // enabled dates visible at once. This prevents issues where the minimum year\n // is the last item of a page OR the maximum year is the first item of a page.\n\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view.\n const activeYear = this._dateAdapter.getYear(this._activeDate);\n const minYearOfPage = activeYear - getActiveOffset(\n this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n\n this._years = [];\n for (let i = 0, row: number[] = []; i < yearsPerPage; i++) {\n row.push(minYearOfPage + i);\n if (row.length == yearsPerRow) {\n this._years.push(row.map(year => this._createCellForYear(year)));\n row = [];\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** Handles when a new year is selected. */\n _yearSelected(year: number) {\n this.yearSelected.emit(this._dateAdapter.createDate(year, 0, 1));\n let month = this._dateAdapter.getMonth(this.activeDate);\n let daysInMonth =\n this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, month, 1));\n this.selectedChange.emit(this._dateAdapter.createDate(year, month,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));\n }\n\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate,\n -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate,\n yearsPerPage - getActiveOffset(\n this._dateAdapter, this.activeDate, this.minDate, this.maxDate) - 1);\n break;\n case PAGE_UP:\n this.activeDate =\n this._dateAdapter.addCalendarYears(\n this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\n break;\n case PAGE_DOWN:\n this.activeDate =\n this._dateAdapter.addCalendarYears(\n this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\n break;\n case ENTER:\n case SPACE:\n this._yearSelected(this._dateAdapter.getYear(this._activeDate));\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n _getActiveCell(): number {\n return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Creates an MatCalendarCell for the given year. */\n private _createCellForYear(year: number) {\n let yearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(year, 0, 1));\n return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year));\n }\n\n /** Whether the given year is enabled. */\n private _shouldEnableYear(year: number) {\n // disable if the year is greater than maxDate lower than minDate\n if (year === undefined || year === null ||\n (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||\n (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {\n return false;\n }\n\n // enable if it reaches here and there's no filter defined\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfYear = this._dateAdapter.createDate(year, 0, 1);\n\n // If any date in the year is enabled count the year as enabled.\n for (let date = firstOfYear; this._dateAdapter.getYear(date) == year;\n date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n\nexport function isSameMultiYearView<D>(\n dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return Math.floor((year1 - startingYear) / yearsPerPage) ===\n Math.floor((year2 - startingYear) / yearsPerPage);\n}\n\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nexport function getActiveOffset<D>(\n dateAdapter: DateAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)),\n yearsPerPage);\n}\n\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear<D>(\n dateAdapter: DateAdapter<D>, minDate: D | null, maxDate: D | null): number {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - yearsPerPage + 1;\n } else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo (a: number, b: number): number {\n return (a % b + b) % b;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewEncapsulation,\n ViewChild,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell, MatCalendarCellCssClasses} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n\nconst DAYS_PER_WEEK = 7;\n\n\n/**\n * An internal component used to display a single month in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-month-view',\n templateUrl: 'month-view.html',\n exportAs: 'matMonthView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatMonthView<D> implements AfterContentInit {\n /**\n * The date to display in this month view (everything other than the month and year is ignored).\n */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n const oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedDate = this._getDateInCurrentMonth(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when a new date is selected. */\n @Output() readonly selectedChange: EventEmitter<D | null> = new EventEmitter<D | null>();\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** The label for this month (e.g. \"January 2017\"). */\n _monthLabel: string;\n\n /** Grid of calendar cells representing the dates of the month. */\n _weeks: MatCalendarCell[][];\n\n /** The number of blank cells in the first row before the 1st of the month. */\n _firstWeekOffset: number;\n\n /**\n * The date of the month that the currently selected Date falls on.\n * Null if the currently selected Date is in another month.\n */\n _selectedDate: number | null;\n\n /** The date of the month that today falls on. Null if today is in another month. */\n _todayDate: number | null;\n\n /** The names of the weekdays. */\n _weekdays: {long: string, narrow: string}[];\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();\n const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');\n const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');\n\n // Rotate the labels for days of the week based on the configured first day of the week.\n let weekdays = longWeekdays.map((long, i) => {\n return {long, narrow: narrowWeekdays[i]};\n });\n this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Handles when a new date is selected. */\n _dateSelected(date: number) {\n if (this._selectedDate != date) {\n const selectedYear = this._dateAdapter.getYear(this.activeDate);\n const selectedMonth = this._dateAdapter.getMonth(this.activeDate);\n const selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);\n\n this.selectedChange.emit(selectedDate);\n }\n\n this._userSelection.emit();\n }\n\n /** Handles keydown events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate,\n 1 - this._dateAdapter.getDate(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate,\n (this._dateAdapter.getNumDaysInMonth(this._activeDate) -\n this._dateAdapter.getDate(this._activeDate)));\n break;\n case PAGE_UP:\n this.activeDate = event.altKey ?\n this._dateAdapter.addCalendarYears(this._activeDate, -1) :\n this._dateAdapter.addCalendarMonths(this._activeDate, -1);\n break;\n case PAGE_DOWN:\n this.activeDate = event.altKey ?\n this._dateAdapter.addCalendarYears(this._activeDate, 1) :\n this._dateAdapter.addCalendarMonths(this._activeDate, 1);\n break;\n case ENTER:\n case SPACE:\n if (!this.dateFilter || this.dateFilter(this._activeDate)) {\n this._dateSelected(this._dateAdapter.getDate(this._activeDate));\n this._userSelection.emit();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n return;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Initializes this month view. */\n _init() {\n this._selectedDate = this._getDateInCurrentMonth(this.selected);\n this._todayDate = this._getDateInCurrentMonth(this._dateAdapter.today());\n this._monthLabel =\n this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]\n .toLocaleUpperCase();\n\n let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate), 1);\n this._firstWeekOffset =\n (DAYS_PER_WEEK + this._dateAdapter.getDayOfWeek(firstOfMonth) -\n this._dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;\n\n this._createWeekCells();\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Creates MatCalendarCells for the dates in this month. */\n private _createWeekCells() {\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n const dateNames = this._dateAdapter.getDateNames();\n this._weeks = [[]];\n for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n if (cell == DAYS_PER_WEEK) {\n this._weeks.push([]);\n cell = 0;\n }\n const date = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate), i + 1);\n const enabled = this._shouldEnableDate(date);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date) : undefined;\n\n this._weeks[this._weeks.length - 1]\n .push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses));\n }\n }\n\n /** Date filter for the month */\n private _shouldEnableDate(date: D): boolean {\n return !!date &&\n (!this.dateFilter || this.dateFilter(date)) &&\n (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&\n (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0);\n }\n\n /**\n * Gets the date in this month that the given Date falls on.\n * Returns null if the given Date is in another month.\n */\n private _getDateInCurrentMonth(date: D | null): number | null {\n return date && this._hasSameMonthAndYear(date, this.activeDate) ?\n this._dateAdapter.getDate(date) : null;\n }\n\n /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */\n private _hasSameMonthAndYear(d1: D | null, d2: D | null): boolean {\n return !!(d1 && d2 && this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&\n this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n NgZone,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {take} from 'rxjs/operators';\n\n/**\n * Extra CSS classes that can be associated with a calendar cell.\n */\nexport type MatCalendarCellCssClasses = string | string[] | Set<string> | {[key: string]: any};\n\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nexport class MatCalendarCell {\n constructor(public value: number,\n public displayValue: string,\n public ariaLabel: string,\n public enabled: boolean,\n public cssClasses?: MatCalendarCellCssClasses) {}\n}\n\n\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: '[mat-calendar-body]',\n templateUrl: 'calendar-body.html',\n styleUrls: ['calendar-body.css'],\n host: {\n 'class': 'mat-calendar-body',\n 'role': 'grid',\n 'aria-readonly': 'true'\n },\n exportAs: 'matCalendarBody',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendarBody implements OnChanges {\n /** The label for the table. (e.g. \"Jan 2017\"). */\n @Input() label: string;\n\n /** The cells to display in the table. */\n @Input() rows: MatCalendarCell[][];\n\n /** The value in the table that corresponds to today. */\n @Input() todayValue: number;\n\n /** The value in the table that is currently selected. */\n @Input() selectedValue: number;\n\n /** The minimum number of free cells needed to fit the label in the first row. */\n @Input() labelMinRequiredCells: number;\n\n /** The number of columns in the table. */\n @Input() numCols = 7;\n\n /** The cell number of the active cell in the table. */\n @Input() activeCell = 0;\n\n /**\n * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n * maintained even as the table resizes.\n */\n @Input() cellAspectRatio = 1;\n\n /** Emits when a new value is selected. */\n @Output() readonly selectedValueChange: EventEmitter<number> = new EventEmitter<number>();\n\n /** The number of blank cells to put at the beginning for the first row. */\n _firstRowOffset: number;\n\n /** Padding for the individual date cells. */\n _cellPadding: string;\n\n /** Width of an individual cell. */\n _cellWidth: string;\n\n constructor(private _elementRef: ElementRef<HTMLElement>, private _ngZone: NgZone) { }\n\n _cellClicked(cell: MatCalendarCell): void {\n if (cell.enabled) {\n this.selectedValueChange.emit(cell.value);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const columnChanges = changes['numCols'];\n const {rows, numCols} = this;\n\n if (changes['rows'] || columnChanges) {\n this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;\n }\n\n if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {\n this._cellPadding = `${50 * this.cellAspectRatio / numCols}%`;\n }\n\n if (columnChanges || !this._cellWidth) {\n this._cellWidth = `${100 / numCols}%`;\n }\n }\n\n _isActiveCell(rowIndex: number, colIndex: number): boolean {\n let cellNumber = rowIndex * this.numCols + colIndex;\n\n // Account for the fact that the first row may not have as many cells.\n if (rowIndex) {\n cellNumber -= this._firstRowOffset;\n }\n\n return cellNumber == this.activeCell;\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n const activeCell: HTMLElement | null =\n this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');\n\n if (activeCell) {\n activeCell.focus();\n }\n });\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n\n/** Datepicker data that requires internationalization. */\n@Injectable({providedIn: 'root'})\nexport class MatDatepickerIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the calendar popup (used by screen readers). */\n calendarLabel: string = 'Calendar';\n\n /** A label for the button used to open the calendar popup (used by screen readers). */\n openCalendarLabel: string = 'Open calendar';\n\n /** A label for the previous month button (used by screen readers). */\n prevMonthLabel: string = 'Previous month';\n\n /** A label for the next month button (used by screen readers). */\n nextMonthLabel: string = 'Next month';\n\n /** A label for the previous year button (used by screen readers). */\n prevYearLabel: string = 'Previous year';\n\n /** A label for the next year button (used by screen readers). */\n nextYearLabel: string = 'Next year';\n\n /** A label for the previous multi-year button (used by screen readers). */\n prevMultiYearLabel: string = 'Previous 20 years';\n\n /** A label for the next multi-year button (used by screen readers). */\n nextMultiYearLabel: string = 'Next 20 years';\n\n /** A label for the 'switch to month view' button (used by screen readers). */\n switchToMonthViewLabel: string = 'Choose date';\n\n /** A label for the 'switch to year view' button (used by screen readers). */\n switchToMultiYearViewLabel: string = 'Choose month and year';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** @docs-private */\nexport function createMissingDateImplError(provider: string) {\n return Error(\n `MatDatepicker: No provider found for ${provider}. You must import one of the following ` +\n `modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a ` +\n `custom implementation.`);\n}\n"],"names":["observableOf","tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AWSA,AAAA,SAAgB,0BAA0B,CA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