Error message when using ng bootstrap with minDate: "minDate value must be or return a formatted date"
HTML Component:
<div class="input-group">
<input class="form-control" name="date_of_birth" type="text" ngbDatepicker #d="ngbDatepicker" id="date_of_birth" formControlName="date_of_birth" placeholder="YYYY-MM-DD" (focus)="d.open()" [minDate]="minDate">
<div class="input-group-addon" (click)="d.toggle()" role="button">
<i class="fa fa-calendar" aria-hidden="true"></i>
</div>
</div>
TS Component:
minDate: NgbDateStruct = { year: 1900, month: 1, day: 1 };
The ng datepicker works fine without setting minDate. However, after assigning minDate, an error is thrown.