Skip to content

fix(datepicker): compilation errors with ViewEngine #19516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/material/datepicker/date-range-input-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export interface MatDateRangeInputParent<D> {
min: D | null;
max: D | null;
dateFilter: DateFilterFn<D>;
rangePicker: {
opened: boolean;
id: string;
};
_startInput: MatDateRangeInputPartBase<D>;
_endInput: MatDateRangeInputPartBase<D>;
_groupDisabled: boolean;
Expand Down Expand Up @@ -138,12 +142,12 @@ abstract class MatDateRangeInputPartBase<D>
}

/** 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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/material/datepicker/datepicker-input-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
}

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

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

/** Gets the date filter function. Used for validation. */
protected abstract _getDateFilter(): DateFilterFn<D> | undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/material/datepicker/datepicker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ export class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D>
}

/** Gets the input's minimum date. */
protected _getMinDate() {
_getMinDate() {
return this._min;
}

/** Gets the input's maximum date. */
protected _getMaxDate() {
_getMaxDate() {
return this._max;
}

Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/material/datepicker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | nu
constructor(elementRef: ElementRef<HTMLInputElement>, dateAdapter: DateAdapter<D>, dateFormats: MatDateFormats, _formField: MatFormField);
protected _assignValueToModel(value: D | null): void;
protected _getDateFilter(): DateFilterFn<D | null>;
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;
Expand Down