Skip to content

Commit

Permalink
refactor(material/datepicker): deprecate unused i18n strings (#25791)
Browse files Browse the repository at this point in the history
Remove two unused i18n strings from datepicker. Remove `startDateLabel`
and `endDateLabel`.

DEPRECATED:
 * startDateLabel is deprecated because it is not used
 * endDateLabel is deprecated because it is not used
  • Loading branch information
zarend committed Oct 11, 2022
1 parent a310fef commit 2b2cd6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/material/datepicker/datepicker-intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ export class MatDatepickerIntl {
/** A label for the 'switch to year view' button (used by screen readers). */
switchToMultiYearViewLabel = 'Choose month and year';

/** A label for the first date of a range of dates (used by screen readers). */
/**
* A label for the first date of a range of dates (used by screen readers).
* @deprecated Provide your own internationalization string.
* @breaking-change 17.0.0
*/
startDateLabel = 'Start date';

/** A label for the last date of a range of dates (used by screen readers). */
/**
* A label for the last date of a range of dates (used by screen readers).
* @deprecated Provide your own internationalization string.
* @breaking-change 17.0.0
*/
endDateLabel = 'End date';

/** Formats a range of years (used for visuals). */
Expand Down
2 changes: 2 additions & 0 deletions tools/public_api_guard/material/datepicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ export class MatDatepickerIntl {
calendarLabel: string;
readonly changes: Subject<void>;
closeCalendarLabel: string;
// @deprecated
endDateLabel: string;
formatYearRange(start: string, end: string): string;
formatYearRangeLabel(start: string, end: string): string;
Expand All @@ -481,6 +482,7 @@ export class MatDatepickerIntl {
prevMonthLabel: string;
prevMultiYearLabel: string;
prevYearLabel: string;
// @deprecated
startDateLabel: string;
switchToMonthViewLabel: string;
switchToMultiYearViewLabel: string;
Expand Down

0 comments on commit 2b2cd6e

Please sign in to comment.