I have a datepicker on angular.js:
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close"> When I click the first time on button , work well, but when I click again , it did work .
I try this:
$scope.open = function ($event) { $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; }; and this:
$scope.open = function ($event) { $event.stopPropagation(); $scope.opened = true; };