I am trying to set the current date within a formGroup in a specific format, but I keep encountering an error with the code below:
'Unable to convert "13/07/2020" into a date' for pipe 'DatePipe'
this.fb.group({
startdateActivity: [this.datePipe.transform(new Date().toLocaleString().substring(0, 10), "yyyy-dd-MM"), Validators.required]
})
<input type="date" formControlName="startdateActivity"/>