Closed DaveC426913 closed 8 years ago
You can capture the change using standard $scope.$watch
.
You may want to take a look at https://github.com/monterail/angular-mighty-datepicker - the new, better version of angular date picker redesigned from scratch (based on angular-date-range-picker experience in the wild)
/cc @venticco
its a question Actully
I have to implement dateLimit how can i set limit to select two dates
Thanks in Advance
Glad the Dave brought me on the right track. Looked up the location of callback within the datepicker-code. Found scope { callback: "&" } and as I knew that the isolated-scope mechanism in directives were a blind spot for me, I was forced to RTF. Thx to this, I could educate myself and as soon as I reached the &-symbol for isolated scopes I knew how to do it:
<user ng-controller="UserCtrl"> <input type="text" date-range-picker ng-model="dates" callback="onDatesChanged()" />
The input-element is contained within the directive user, which is bound to the Controller UserCtrl. The latter contains a function $scope.onDatesChanged = function() {.... So the date-range-picker gets the function passed into its isolated scope.
Maybe that was to detailed, but just alone the word callback could not help in the first place
Thanks for opening the issue. We're sorry to say that we've stopped maintaining this project in favor of angular-mighty-datepicker. We encourage you to check it out instead.
It would be really cool if there were a little more documentation. For example, how do I actually capture the dates in my controller? How do I know they've changed? I tried ng-click="ok($event)" but it does nothing.
[EDIT] The callback is what I was looking for. what would be very helpful if it were in the docs.