What's the correct way to display a date pipe in a reactive form?
app-component.html
<form [formGroup]="profileForm" (ngSubmit)="onSubmit()">
<label for="fecha">Fecha: </label>
<input
formControlName="fecha"
type="text"
[value]="profileForm.get('fecha')?.value | date: 'dd/MM/yyyy'" >
<button (click)="onSubmit()">Update Profile</button>
</form>
app-component.ts
profileForm = new FormGroup({
fecha: new FormControl('2022-01-11 01:00:00.000')
});
onSubmit() {
console.warn(this.profileForm.value);
}