문제

Given the pop-up example at http://plnkr.co/edit/idrirF9zxvCMCQWTk8nr?p=preview how do I actually get the date if the user changes it?

I am guessing that I should do it in $scope.open = function($event) but I just don't know how. I have searched this site & googled extensively. What did I miss? Thanks.

도움이 되었습니까?

해결책

you plunk link is not working. I don't know what exactly happen in your code.

I think maybe your miss ng-model, ng-model is the way to do two-way data binding in angular .

for example

<input type="text" datepicker-popup="dd-MMMM-yyyy" ng-model="dt" />

in this example date is binding to dt (ng-model="dt")

you can get data by $scope.dt if you want to watch the date change you can do

$scope.$watch('dt',function(val){
   //to do       
   console.log(val)
})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top