I want to format the output of the Primeng Range Calender for both dates to be 'dd/MM/yyyy' like this, and I tried to use pipe to transform the these data.
(我想像这样将两个日期的Primeng Range日历的输出格式设置为“ dd / MM / yyyy”,并且尝试使用管道转换这些数据。)
But is only only transforming the first date, and not the second.(但是,仅改变第一个日期,而不是第二个。)
Html code is:(HTML代码是:)
<div>{{rangeDates | date: 'dd/MM/yyyy'}}</div>
Ts file is:
(ts文件是:)
rangeDates: Date[];
I'm getting this error:
(我收到此错误:)
Error: InvalidPipeArgument: 'Unable to convert "Mon Dec 02 2019 00:00:00 GMT+0100 (Central European Standard Time),Tue Dec 10 2019 00:00:00 GMT+0100 (Central European Standard Time)" into a date' for pipe 'DatePipe'
ask by Ivana translate from so