InvalidPipeArgument


#1

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?


#2

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

then

on html

{{ chat.last_msg.date| amParse:‘DD/MM/YYYY hh:mm A’ | amDateFormat:‘hh:mm A’ }}

source link :- https://stackoverflow.com/questions/45668919/invalid-pipe-argument-in-ionic-3/45670293#45670293


#3

Ive already fixed this issue months ago.

Thankyou!