I'm encountering an issue with the input type date. I am trying to bind data from a component. Below is my field:
<div class="col-md-6">
<label for="dateOfReport">Data zgłoszenia błędu:</label>
<input type="date" formControlName="dateOfReport" id="dateOfReport" class="form-control" [value]="report.dateOfReport | date:'dd.MM.yyyy'"> {{report.dateOfReport | date:'dd.MM.yyyy'}}
</div>
Here's how the variable dateOfReport looks:
new Date().toJSON().slice(0, 10)
What am I doing wrong? The {{ .. }} correctly displays the date, but my field doesn't accept it as default.