I use Bootstrap components written in pure AngularJS by the AngularUI Team http://angular-ui.github.io/bootstrap/
Problem is that inside view datepicker won't work correctly. so in view I have code below:
<input type="text"
datepicker-popup="{{format}}"
ng-model="datepicker"
show-weeks="fasle"
is-open="opened"
/>
<button class="btn" ng-click="open()"><i class="icon-calendar"></i></button>
in controller I try to show date picker by clicking on button:
scope.open = function(){
timeout(function() {
scope.opened = true;
});
};
in scope.opened store true! but nothing happend;
Second problem I try to retrieve date from date picker. When I initialize it I use next:
scope.datepicker = new Date();
scope.format = "dd-MM-yyyy";
and retrieve
scope.save = function() {
console.log(scope.datepicker);
};
date picker always return current date...
BUT out side view everything works perfect! Why?
EDIT
this is live demo
Try to change date and click save. OR try to call dapicker clicking by button