Description
Bug, feature request, or proposal:
Bug when the OS Primary language (English) is different from the Region (Germany)
- The date object value is: "Tue Jul 04 2017 00:00:00 GMT+0200 (CEST)" - OK
- It is is formatted in the input as: "04/07/2017" - Bug
- When opening the datepicker it shows the month APR 2017 - Bug
- In the datepicker the selected date is 4th of JUL 2017 - OK
What is the expected behavior?
- Date should be formatted as: "07/04/2017"
- When opening the datepicker it should show the month JUL 2017
What is the current behavior?
Bad formatting, and wrong month shown when opening the datepicker like this:
What are the steps to reproduce?
On MacOS goto Language & Region preferences -> Set English - Primary -> Select Region: Germany, like this:
Open Plunker template: https://plnkr.co/edit/29fGaJ8uUQNsYoWDeXk4?p=preview
Just select a date in the datepicker, it will be wrongly formatted and you will get the above behavior.
If you then match the Deutsch - Primary to the Region: Germany region all is OK. Same for English - Primary to the Region: United States, but not when you mix them up like above.
What is the use-case or motivation for changing an existing behavior?
Datepicker should consistently work with the system formats, also when Language doesn't match the region.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/core": "^4.2.3",
"@angular/material": "2.0.0-beta.7":
"typescript": "2.3.4"
MacOS Sierra
Chrome, Firefox, Safari