Skip to content

bug(Datepicker): locale with MomentDateAdapter #31998

@vdelplanque

Description

@vdelplanque

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.2.19

Description

The MomentDateAdapter doesn't take the local in account anymore.

Reproduction

StackBlitz link:
Steps to reproduce:

  1. In the documentation of the v19, the Datepicker correctly switches to Japanese to French: https://v19.material.angular.dev/components/datepicker/overview#setting-the-locale-code
  2. In the v20 documentation, the dateformat, months, days, first day of week, etc stays in US: https://material.angular.dev/components/datepicker/overview#setting-the-locale-code

Expected Behavior

The Datepicker should switch to Japanese to French locale

Actual Behavior

The Datepicker keeps displaying US format

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Hint

When I build my app with "builder": "@angular-devkit/build-angular:browser" instead of "builder": "@angular/build:application" it works, even in version 20

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepickerdocsThis issue is related to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions