Skip to content

Commit 00e2171

Browse files
authored
fix(datepicker): compilation errors with ViewEngine (#19516)
Fixes a few compilation errors that only happen when the date range picker is compiled with `ViewEngine`.
1 parent 2a6a63c commit 00e2171

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

src/material/datepicker/date-range-input-parts.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export interface MatDateRangeInputParent<D> {
4848
min: D | null;
4949
max: D | null;
5050
dateFilter: DateFilterFn<D>;
51+
rangePicker: {
52+
opened: boolean;
53+
id: string;
54+
};
5155
_startInput: MatDateRangeInputPartBase<D>;
5256
_endInput: MatDateRangeInputPartBase<D>;
5357
_groupDisabled: boolean;
@@ -138,12 +142,12 @@ abstract class MatDateRangeInputPartBase<D>
138142
}
139143

140144
/** Gets the minimum date from the range input. */
141-
protected _getMinDate() {
145+
_getMinDate() {
142146
return this._rangeInput.min;
143147
}
144148

145149
/** Gets the maximum date from the range input. */
146-
protected _getMaxDate() {
150+
_getMaxDate() {
147151
return this._rangeInput.max;
148152
}
149153

src/material/datepicker/datepicker-input-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
174174
}
175175

176176
/** Gets the minimum date for the input. Used for validation. */
177-
protected abstract _getMinDate(): D | null;
177+
abstract _getMinDate(): D | null;
178178

179179
/** Gets the maximum date for the input. Used for validation. */
180-
protected abstract _getMaxDate(): D | null;
180+
abstract _getMaxDate(): D | null;
181181

182182
/** Gets the date filter function. Used for validation. */
183183
protected abstract _getDateFilter(): DateFilterFn<D> | undefined;

src/material/datepicker/datepicker-input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ export class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D>
162162
}
163163

164164
/** Gets the input's minimum date. */
165-
protected _getMinDate() {
165+
_getMinDate() {
166166
return this._min;
167167
}
168168

169169
/** Gets the input's maximum date. */
170-
protected _getMaxDate() {
170+
_getMaxDate() {
171171
return this._max;
172172
}
173173

tools/public_api_guard/material/datepicker.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ export declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | nu
217217
constructor(elementRef: ElementRef<HTMLInputElement>, dateAdapter: DateAdapter<D>, dateFormats: MatDateFormats, _formField: MatFormField);
218218
protected _assignValueToModel(value: D | null): void;
219219
protected _getDateFilter(): DateFilterFn<D | null>;
220-
protected _getMaxDate(): D | null;
221-
protected _getMinDate(): D | null;
220+
_getMaxDate(): D | null;
221+
_getMinDate(): D | null;
222222
protected _getValueFromModel(modelValue: D | null): D | null;
223223
protected _openPopup(): void;
224224
getConnectedOverlayOrigin(): ElementRef;

0 commit comments

Comments
 (0)