Reputation: 1215
Referring to this directive for AngularJS, which wraps Bootstrap's datepicker: http://mgcrea.github.io/angular-strap/#/datepicker
I'm unable to find a way to clear the control programmatically once it's been set. I have tried setting it to null and empty string, neither work.
Upvotes: 0
Views: 9504
Reputation: 77904
Just add to controller:
$scope.clickMe = function(){
$scope.datepicker = null;
};
It will clear date input.
see Plunker
Upvotes: 2