kekeh / angular-mydatepicker

Angular datepicker and date range picker :date:
https://kekeh.github.io/angular-mydatepicker/
MIT License
1 stars 11 forks source link

Clear button option in inline is missing in angular-mydatepicker #78

Closed balinenidileep closed 3 years ago

kekeh commented 3 years ago

Hello @balinenidileep

<input type="hidden" angular-mydatepicker name="mydate" [(ngModel)]="model" 
     [options]="myDatePickerOptions" #dp="angular-mydatepicker" />
@ViewChild('dp') ngxdp: AngularMyDatePickerDirective;

model: IMyDateModel = null;

// call directive method to clear the date
clearDate1(): void {
    this.ngxdp.clearDate();
}

// set model to null to clear the date
clearDate2(): void {
    this.model = null;
}