79251751

Date: 2024-12-04 15:21:12
Score: 1.5
Natty:
Report link

For a standalone component you need to provide the MAT_DATE_LOCALE in the component providers collection:

import { MAT_DATE_LOCALE } from '@angular/material/core';
providers: [
    {provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
    provideNativeDateAdapter()
  ]

The result:

enter image description here

For official documentation see https://material.angular.io/components/datepicker/overview#setting-the-locale-code

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: David Brunning