Skip to content
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
@mfisch04

Description

@mfisch04

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/RGkkYE
  • Details:
    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.8
  • Angular Material Version: 1.1.1

Additional Information:

  • Browser Type: * Chrome
  • Browser Version: *52.0.2743.116
  • OS: * Windows 7
  • Stack Traces: NA

Metadata

Metadata

Assignees

Labels

has: Pull RequestA PR has been created to address this issueneeds: investigationThe cause of this issue is not well understood and needs to be investigated by the team or community

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions