I've two NgbDatePicker in my component:
input(
type="text",
ngbDatepicker,
#d="ngbDatepicker",
[readonly]="true",
formControlName='startDate',
(dateSelect)='setNewMinDate($event)',
)
input(
type="text",
ngbDatepicker,
#e="ngbDatepicker",
[readonly]="true"
formControlName='endDate'
)
and this handler:
@ViewChild('e', {static: false}) endDateComponent: Query;
setNewMinDate(e: NgbDateStruct) {
const minDate: Moment = moment(e.year + '-' + e.month + '-' + e.day);
this.createAnnForm.value.endDate = minDate.toISOString();
this.endDateComponent.navigateTo(e);
}
Form model works with ISO date.
What happens is that the calendar popup change is date to the new one, but the input field doesn't update itself. What is the problem?