Skip to content

Update NativeDateAdapter to use the new i18n api #8100

Open
@ocombe

Description

@ocombe

Bug, feature request, or proposal:

Feature Request

What is the expected behavior?

Material should no longer use the intl API with Angular v5.

What is the current behavior?

Material's NativeDateAdapter uses the intl API

What are the steps to reproduce?

Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.

Plunker starter (using on @master): https://goo.gl/DlHd6U

StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV

What is the use-case or motivation for changing an existing behavior?

In Angular v5 we have removed the dependency on the intl API to use CLDR data instead. We've also added a new I18n API that can be used by libraries for such a case.
It's very easy to rewrite the NativeDateAdapter to use this instead of intl. The only problem is that Material requires a few formats that are not yet supported by the API.
We can write an adapter that does partial matching, but it'd be better to wait for angular/angular#19823 to be resolved first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: material/datepickeri18nThis issue is related to internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions