javascript - Get ng-model value from quick-datepicker tag -


i use angularjs quick-datepicker library. problem can't value of ng-model

<quick-datepicker type="text" name='start_date'  ng-model="repariment.start_date" required></quick-datepicker> 

the above code inside form.

<script type='text/javascript'>     app.config(function(ngquickdatedefaultsprovider) {         return ngquickdatedefaultsprovider.set({         });     });     app.controller("perbaikancontroller", function($scope) {         $scope.mydate = null         $scope.settotoday = function() { $scope.mydate = new date(); }     }); </script> 

when submit , check $repariment.start_date, return current datetime (maybe because null). @ backend (nodejs), can't value. how make work?

problem seems here $repariment.start_date change $scope.mydate in html markup.

fixed html:

<quick-datepicker type="text" name='start_date' ng-model="mydate" required></quick-datepicker> 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -