'Angular date pipe formats only start date in range calendar

I want to use date pipe in HTML to output dates format (start and end dates).

The default is

Tue Mar 01 2022 00:00:00 GMT+0100 (Central Standard Time),
Thu Mar 31 2022 00:00:00 GMT+0200 (Central Summer Time)

But, when I use {{ date | date }} pipe in HTML I get only start date formatted as I want, but it doesn't show end date, like in the picture below.

What am I doing wrong?

My code (HTML):

<h5>You selected: {{ date | date}}</h5>
<p-calendar
  [(ngModel)]="date1"
  selectionMode="range"
  [readonlyInput]="true"
  inputId="range"
></p-calendar>

angular date pipe



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source