This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
md-datepicker displays wrong date with timezone and initialized model #9725
Closed
Description
Actual Behavior:
What is the issue? *
Opening an md-datepicker with the timezone set to UTC with the date already initialized still displays the date and calendar with the localized date.
The datepicker $formatter is being called before the date input $formatter which does the time zone conversion. I tried adding a custom $formatter, but it's also called after the datepicker.
What is the expected behavior?
Display the date in UTC.
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
http://codepen.io/anon/pen/RGkkYEDetails:
myDate initilized to "2016-09-28T00:00:00.000Z" displays 9/27/2016 and calendar defaults to 9/27.
Angular Versions: *
Angular Version:
1.5.8Angular Material Version:
1.1.1
Additional Information:
Browser Type: *
ChromeBrowser Version: *
52.0.2743.116OS: *
Windows 7Stack Traces:
NA