Skip to content

Commit

Permalink
Revert "refactor(material/datepicker): update comparisonDateLabel value"
Browse files Browse the repository at this point in the history
This reverts commit 5eb3ff3.
  • Loading branch information
essjay05 committed Nov 7, 2024
1 parent e825b72 commit 38033c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/material/datepicker/calendar-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export class MatCalendarBody<D = any> implements OnChanges, OnDestroy, AfterView

if (this.comparisonStart !== null && this.comparisonEnd !== null) {
if (value === this.comparisonStart && value === this.comparisonEnd) {
return `${this._comparisonStartLabelId} ${this._comparisonEndLabelId}`;
return `${this._comparisonStartLabelId}-${this._comparisonEndLabelId}`;
} else if (value === this.comparisonStart) {
return this._comparisonStartLabelId;
} else if (value === this.comparisonEnd) {
Expand Down
2 changes: 1 addition & 1 deletion src/material/datepicker/datepicker-intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class MatDatepickerIntl {
* A label used to indicate that the date is part of a selected comparison
* sub range of dates (used by screen readers).
*/
comparisonDateLabel = 'Comparison range';
comparisonDateLabel = 'Sub range';

/** Formats a range of years (used for visuals). */
formatYearRange(start: string, end: string): string {
Expand Down

0 comments on commit 38033c0

Please sign in to comment.