Error: InvalidPipeArgument: ‘2017-12-08 15:31:00’ for pipe ‘DatePipe’

html pipe code.

| date: ‘EEE, MMM, d’

This is working on windows/Android but iOS and safari throws error.
Whats wrong with this?

Using MomentModule not custom pipe.

try doing this.

  1. you need to install the library angular2-moment

npm install angular2-moment --save

  1. in your page.module add MomentModule to imports


on html

{{| amParse:‘DD/MM/YYYY hh:mm A’ | amDateFormat:‘hh:mm A’ }}

source link :-

Ive already fixed this issue months ago.


Hey, I m facing the same issues can you tell me how did you solve the problem?