I am using the following code in my angular component template.
<input
type="text"
(click)="dp.toggle()"
ngbDatepicker
#dp="ngbDatepicker"
id="myDatePicker"
autocomplete="off"
placeholder="mm/dd/yyyy"
placement="bottom-left"
[maxDate]="maxDate"
formControlName="modifiedAfter" />
form group:
the form in component is:
searchForm = new FormGroup({
modifiedAfter: new FormControl(null),
name: new FormControl(null),
}) as TypedFormGroup<SearchModel>;
Removing the ngbDatePicker attribute to the input element doesnt throw the error.