MAT_DATE_FORMATS definition/meaning of fields MAT_DATE_FORMATS definition/meaning of fields typescript typescript

MAT_DATE_FORMATS definition/meaning of fields


Well, I figured out the following:

datepicker

 parse: {    dateInput: 'DD.MM.YYYY',  },   display: {    dateInput: 'DD.MM.YYYY',    monthYearLabel: 'MMM YYYY',    dateA11yLabel: 'LL',    monthYearA11yLabel: 'MMMM-YYYY',  },
  • with parse.dateInput: you can let the user enter any type of date with any format, and the date adapter will reformat it to the format you specify in this attribute

  • with display.dateInput you can specify the input date format (marked with 1)

  • display.monthYearLabel you can specify the area marked with 2

unfortunately, I still don't know about the rest!


A11Y - means accessibility. Look here https://material.angular.io/cdk/a11y/overviewand here https://material.angular.io/components/datepicker/overview#accessibility

According that I think these formats are used to display datepicker when accessibility mode on.