Material example for customizing-the-parse-and-display-formats for date picker uses custom MAT_DATE_FORMATS
export const MY_FORMATS = {
parse: {
dateInput: 'LL',
},
display: {
dateInput: 'LL',
monthYearLabel: 'MMM YYYY',
dateA11yLabel: 'LL',
monthYearA11yLabel: 'MMMM YYYY',
},
};
I could not find where and how these fields like dateA11yLabel
will come into play. What I could figure out was display.dateInput
is used in displaying selected date on calendar and display.monthYearLabel
is used in the select drop-down of year selector.
- Where are rest of the fields used?
- When writing custom MAT_DATE_FORMATS is it mandatory to define all fields?