I am trying to format a date input to display only yyyy/MM/dd
. I am getting the date from an API GET call which returns the date as yyyy-MM-ddThh:mm:ss.ms+Z
in the response body as Json
{... date: "2020-06-30T08:04:11.9775152+02:00" ...} //ommited for brevity
My input is two-way bounded
<input type="date" [(ngModel)]="date">
But the input
's value remains yyyy/MM/dd
. Any ideas on how I can format the date correctly on either HTML/TS side?