This repository was archived by the owner on Sep 5, 2024. It is now read-only.
  
  
  
  
  
Description
I have a search form with md-datepicker's on it. The form having 'Search' and 'Clear' buttons.
If we select any dates from the md-datepicker and click  Clear button it will clear  selected date as shown below
_Clear function: _
clear = function () {
let ctrl = this;
ctrl.searchCriteria.begindate = null;
ctrl.searchCriteria.enddate = null;
}
html:
`
     <md-datepicker flex ng-model="sCtrl.searchCriteria.begindate" md-placeholder="Begin Date"></md-datepicker>
 
If I enter an invalid date manually(ex:786/786/786) and hit the Clear button on the form  it wont clear the dates from the respective fields.
I have googled a lot on this issue, but couldn't find a proper solution on this issue. Any help would really be appreciated.
Thanks