Closed pramodrwt closed 6 years ago
With help of @ViewChild
, I have done this
How may I ask you did this out of curiosity. Looking quickly would just set startDate and endDate to ''.
Example
@ViewChildren(DaterangePickerComponent) singledates: QueryList
import { DaterangePickerComponent } from 'ng2-daterangepicker';
@ViewChild(DaterangePickerComponent) private picker: DaterangePickerComponent;
//reset start date and end date
this.picker.datePicker.setStartDate(new Date());
this.picker.datePicker.setEndDate(new Date());
I believe you can implement that in your app