Angular reactive forms input not updating

219 views
Skip to first unread message

john.mb...@gmail.com

unread,
Mar 31, 2021, 8:04:39 AM3/31/21
to Angular and AngularJS discussion

My first attempt was updating the inout as it was just one formControl, now I have control of the <ngb-datepicker> and binding formControl property [formControl]="control"
the form output is correct but my input field is not showing the selected date please help

```
<div class="input-group">
<input
type="text"
[formControl]="control"
[minDate]="minDate"
[maxDate]="maxDate"
placeholder="yyyy-mm-dd"
name="dp"

ngbDatepicker
/>
<ng-template #popContent>
<ngb-datepicker
[formControl]="control"
(navigate)="date = $event.next"
name="dp"
ngbDatepicker
></ngb-datepicker>
<ngb-timepicker [formControl]="control"></ngb-timepicker>
</ng-template>
<div class="input-group-append">
<button
class="btn btn-outline-secondary calendar"
placement="left"

[ngbPopover]="popContent"
popoverTitle="Date and Time selection"
type="button"
>SELECT DATE
</button>
</div>
</div>```
Reply all
Reply to author
Forward
0 new messages