Skip to content

Date pipe messes up formatting an iso 8601 formatted string using a custom format in internet explorer 11 #16625

@Waterstraal

Description

@Waterstraal

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
A iso 8601 formatted string formatted by using a custom format doesn't output the in the given format in IE11.

Expected behavior
The iso 8601 formatted string get's formatted in the given format in IE11.

Minimal reproduction of the problem with instructions
The following:

{{'2017-05-07T22:14:39'| date:'dd-MM-yyyy HH:mm'}}

Outputs 07-05-2017 22:00:5/7/2017 10:14:39 PM instead of 07-05-2017 22:14

Plunker: http://plnkr.co/edit/pcoEmL1gR53tyqG9p6ZY?p=preview

What is the motivation / use case for changing the behavior?
Seems like a bug to me.

Please tell us about your environment:
Win 7, angular-cli 1.0, yarn

  • Angular version: 4.1.1

  • Browser: IE 11.0.9600.18639

(Tested oké in Firefox 54.0a2, different issue in Chrome 57.0.2987.133)

  • Language: TypeScript 2.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationtype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions