i have array of objects, here if the date is picked from the datetime calender, the value is not binding to that object, but if i change the date manually then it works, but if i select from calendar then the value is nit binding. I have tried with (change) and (ngModelChange), but both didnt work.
HTML:
<div class="col-6
*ngFor="let restrictValue of Restrictions;let i = index">
<div class="form-group">
<input type="text" class="form-control onlyDateTime" placeholder="MM/DD/YYYY HH:MM AM/PM"
[disabled]="!restrictValue.boolValue" [(ngModel)]="restrictValue.datetime" (change)="dateRestriction($event,restrictValue)" (click)="dateRestriction($event, i)"
[ngModelOptions]="{standalone: true}" >
</div>
</div>
TS:
dateRestriction(event,restriction) {
$('.onlyDateTime').datetimepicker();
$('.onlyDate').datetimepicker({
format: 'L'
});
$('.onlyDateTime').datetimepicker(
).on('dp.change', (e)=>{
const date = e.date;
});
}