@@ -19,40 +19,51 @@ export class MatDatepickerIntl {
19
19
readonly changes : Subject < void > = new Subject < void > ( ) ;
20
20
21
21
/** A label for the calendar popup (used by screen readers). */
22
- calendarLabel : string = 'Calendar' ;
22
+ calendarLabel = 'Calendar' ;
23
23
24
24
/** A label for the button used to open the calendar popup (used by screen readers). */
25
- openCalendarLabel : string = 'Open calendar' ;
25
+ openCalendarLabel = 'Open calendar' ;
26
26
27
27
/** Label for the button used to close the calendar popup. */
28
- closeCalendarLabel : string = 'Close calendar' ;
28
+ closeCalendarLabel = 'Close calendar' ;
29
29
30
30
/** A label for the previous month button (used by screen readers). */
31
- prevMonthLabel : string = 'Previous month' ;
31
+ prevMonthLabel = 'Previous month' ;
32
32
33
33
/** A label for the next month button (used by screen readers). */
34
- nextMonthLabel : string = 'Next month' ;
34
+ nextMonthLabel = 'Next month' ;
35
35
36
36
/** A label for the previous year button (used by screen readers). */
37
- prevYearLabel : string = 'Previous year' ;
37
+ prevYearLabel = 'Previous year' ;
38
38
39
39
/** A label for the next year button (used by screen readers). */
40
- nextYearLabel : string = 'Next year' ;
40
+ nextYearLabel = 'Next year' ;
41
41
42
42
/** A label for the previous multi-year button (used by screen readers). */
43
- prevMultiYearLabel : string = 'Previous 24 years' ;
43
+ prevMultiYearLabel = 'Previous 24 years' ;
44
44
45
45
/** A label for the next multi-year button (used by screen readers). */
46
- nextMultiYearLabel : string = 'Next 24 years' ;
46
+ nextMultiYearLabel = 'Next 24 years' ;
47
47
48
48
/** A label for the 'switch to month view' button (used by screen readers). */
49
- switchToMonthViewLabel : string = 'Choose date' ;
49
+ switchToMonthViewLabel = 'Choose date' ;
50
50
51
51
/** A label for the 'switch to year view' button (used by screen readers). */
52
- switchToMultiYearViewLabel : string = 'Choose month and year' ;
52
+ switchToMultiYearViewLabel = 'Choose month and year' ;
53
53
54
- /** Formats a range of years. */
54
+ /** A label for the first date of a range of dates (used by screen readers). */
55
+ startDateLabel = 'Start date' ;
56
+
57
+ /** A label for the last date of a range of dates (used by screen readers). */
58
+ endDateLabel = 'End date' ;
59
+
60
+ /** Formats a range of years (used for visuals). */
55
61
formatYearRange ( start : string , end : string ) : string {
56
62
return `${ start } \u2013 ${ end } ` ;
57
63
}
64
+
65
+ /** Formats a label for a range of years (used by screen readers). */
66
+ formatYearRangeLabel ( start : string , end : string ) : string {
67
+ return `${ start } to ${ end } ` ;
68
+ }
58
69
}
0 commit comments