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. But is only only transforming the first date, and not the second. Html code is:
<div>{{rangeDates | date: 'dd/MM/yyyy'}}</div>
Ts file is:
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'