fetrarij / ngx-daterangepicker-material

Pure Angular 2+ date range picker with material design theme, a demo here:
https://fetrarij.github.io/ngx-daterangepicker-material/
MIT License
247 stars 248 forks source link

change event is triggered twice #231

Open jiangyh1024 opened 4 years ago

jiangyh1024 commented 4 years ago
 <input type="text" class="ml-1 w-100 date-range-picker" ngxDaterangepickerMd [(ngModel)]="dateRange"
      placeholder="Search date range" [autoApply]="true" (change)="onDateRangePickerChanged($event)" />

public dateRange: any;

jiangyh1024 commented 4 years ago

change should not be triggered util user selects the date

kennyrafael commented 4 years ago

Same issue, I'm connected to a socket, and this is triggering twice my calls, so annoying.

tylertucker202 commented 4 years ago

Same issue. The event is an empty date range object. I get around this by including an if inside onDateRangePickerChanged(). Something like if(event.startDate) { ...event handling stuff } Ideally I would like to trigger an event when the apply button is triggered.

duxor commented 4 years ago

Same for me

duplicate of https://github.com/fetrarij/ngx-daterangepicker-material/issues/195