0

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?

1
  • Mawg, do you still have access to the code that was the basis of this question in 2014? Commented May 24, 2024 at 13:53

1 Answer 1

1

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)
})
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.