[Safari only] Invalid argument for pipe 'DatePipe' - Safari cannot parse Date offsets

See original GitHub issue

I’m submitting a …

[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

Error shows up, only on Safari (Version 10.0 (11602.1.50.0.10)) screen shot 2016-10-17 at 01 10 54

Expected behavior

Expected no error to show up. Google Chrome works fine

Minimal reproduction of the problem with instructions

Go to the following Plunkr with Safari and Google Chrome. Chrome works perfectly.

Plunkr: https://plnkr.co/edit/8ieBbla6Pk3jFQKkHsNc?p=preview

What is the motivation / use case for changing the behaviour?

So it works on Safari as well as Chrome

Please tell us about your environment:

Max OS X El Capitan 10.11.6

  • Angular version: 2.0.0

  • Browser: Chrome Latest, Safari 10.0 (11602.1.50.0.10), iOS Safari

  • Language: TypeScript 2.0.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:12
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
MichalCzerwonkacommented, Nov 2, 2017

It’s still a bug in safari when you have date like that: 2017-11-02 00:00:00.000

edit: '2017-11-02 00:00:00.000'.replace(/\s/g, "T") this work’s in Safari and Chrome.

8reactions
LeonardoMinatiCrispyBaconcommented, Jul 31, 2018

This issue is still here

Read more comments on GitHub >

github_iconTop Results From Across the Web

InvalidPipeArgument: '2017-12-05 05:30:00 for pipe 'DatePipe'
Invalid argument for pipe 'DatePipe' - Safari cannot parse Date offsets ... If you want lowercase, then add the lowercase pipe
Read more >
'2017-12-05 05:30:00 for pipe 'DatePipe' - Safari-moment.js
It requires the date in the T format i.e. '2017-11-02T00:00:00' ... Invalid argument for pipe 'DatePipe' - Safari cannot parse Date offsets.
Read more >
DatePipe Error only on Safari - Ionic Forum
I am using the Angular DatePipe to format my dates I am getting from an API call, but it doesn't work only on...
Read more >
'Unable To Convert "14-05-2021" Into A Date' For Pipe ...
Html:151 Error Error: Invalidpipeargument: 'Unable To Convert ... argument for pipe 'DatePipe' Safari cannot parse Date offsets #12334.
Read more >
'Unable to convert "Invalid Date" into a date' for pipe 'DatePipe ...
Answers related to “InvalidPipeArgument: 'Unable to convert "Invalid Date" into a date' for pipe 'DatePipe' firefox” · invalid datetime format 1292 · pipe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found