From 86face267dc2db6e78364b99167b1f0a5c40556a Mon Sep 17 00:00:00 2001 From: crisbeto Date: Tue, 2 Jun 2020 20:05:26 +0200 Subject: [PATCH] fix(datepicker): compilation errors with ViewEngine Fixes a few compilation errors that only happen when the date range picker is compiled with `ViewEngine`. --- src/material/datepicker/date-range-input-parts.ts | 8 ++++++-- src/material/datepicker/datepicker-input-base.ts | 4 ++-- src/material/datepicker/datepicker-input.ts | 4 ++-- tools/public_api_guard/material/datepicker.d.ts | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/material/datepicker/date-range-input-parts.ts b/src/material/datepicker/date-range-input-parts.ts index a0ccc111c3e8..6d30b24e88e3 100644 --- a/src/material/datepicker/date-range-input-parts.ts +++ b/src/material/datepicker/date-range-input-parts.ts @@ -48,6 +48,10 @@ export interface MatDateRangeInputParent { min: D | null; max: D | null; dateFilter: DateFilterFn; + rangePicker: { + opened: boolean; + id: string; + }; _startInput: MatDateRangeInputPartBase; _endInput: MatDateRangeInputPartBase; _groupDisabled: boolean; @@ -138,12 +142,12 @@ abstract class MatDateRangeInputPartBase } /** Gets the minimum date from the range input. */ - protected _getMinDate() { + _getMinDate() { return this._rangeInput.min; } /** Gets the maximum date from the range input. */ - protected _getMaxDate() { + _getMaxDate() { return this._rangeInput.max; } diff --git a/src/material/datepicker/datepicker-input-base.ts b/src/material/datepicker/datepicker-input-base.ts index edde4a071d8f..d137d69d9c22 100644 --- a/src/material/datepicker/datepicker-input-base.ts +++ b/src/material/datepicker/datepicker-input-base.ts @@ -174,10 +174,10 @@ export abstract class MatDatepickerInputBase | undefined; diff --git a/src/material/datepicker/datepicker-input.ts b/src/material/datepicker/datepicker-input.ts index efba2eaeb61b..03475e35661a 100644 --- a/src/material/datepicker/datepicker-input.ts +++ b/src/material/datepicker/datepicker-input.ts @@ -162,12 +162,12 @@ export class MatDatepickerInput extends MatDatepickerInputBase } /** Gets the input's minimum date. */ - protected _getMinDate() { + _getMinDate() { return this._min; } /** Gets the input's maximum date. */ - protected _getMaxDate() { + _getMaxDate() { return this._max; } diff --git a/tools/public_api_guard/material/datepicker.d.ts b/tools/public_api_guard/material/datepicker.d.ts index 3badea56e3a6..7a4722c1251b 100644 --- a/tools/public_api_guard/material/datepicker.d.ts +++ b/tools/public_api_guard/material/datepicker.d.ts @@ -217,8 +217,8 @@ export declare class MatDatepickerInput extends MatDatepickerInputBase, dateAdapter: DateAdapter, dateFormats: MatDateFormats, _formField: MatFormField); protected _assignValueToModel(value: D | null): void; protected _getDateFilter(): DateFilterFn; - protected _getMaxDate(): D | null; - protected _getMinDate(): D | null; + _getMaxDate(): D | null; + _getMinDate(): D | null; protected _getValueFromModel(modelValue: D | null): D | null; protected _openPopup(): void; getConnectedOverlayOrigin(): ElementRef;