angularjs - Update $scope values from bootstrap datepicker -


i have bootstrap datepicker set todays date. html:

<input type="text" class="form-control" datepicker-popup="{{dateformat}}" ng-model="parent.dateregarding" is-open="dateopened" datepicker-options="dateoptions" ng-required="true" ng-click="dateopened = true" close-text="close" max-date="parent.dateregarding" />  

angularjs function:

function activate() {          // format , options datepicker         $scope.dateformat = 'yyyy-mm-dd';         $scope.tiemformat = 'hh:mm';         $scope.dateoptions = { formatyear: 'yy', startingday: 1 };          // default dates datepicker         var dateregarding = new date();          var timeregarding = new date();          $scope.parent = { 'dateregarding': dateregarding, 'timeregarding': timeregarding}; } 

the picker works fine, how update $scope.parent.dateregarding when user changes date?


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -