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

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -