I need to build a page that on changing a date, it will go to a specific page (using angular ui router).
I add this html code
<input class="form-control" change="onChange(date)" ng-model="date" placeholder="Select a date..." format= "DD/MM/YYYY" moment-picker="date">
and the onChange function is like this:
$scope.onChange = function(date){var date = moment(date, "DD/MM/YYYY");$state.go('list', {day: date.get('date'), month: (date.get('month')+1), year: date.get('year')})}
But In console I have this error
VM3314:27 TypeError: Cannot read property 'removeChild' of null at close (angular-moment-picker.min.js:formatted:299) at angular.js:20440 at e (angular.js:6362) at angular.js:6642VM3314:27 TypeError: Cannot read property 'removeChild' of null at close (angular-moment-picker.min.js:formatted:299) at angular.js:20440 at e (angular.js:6362) at angular.js:6642 "Possibly unhandled rejection: {}"
I discover that delaying the $state.go function is enogh to avoid this error.
Hi.
I need to build a page that on changing a date, it will go to a specific page (using angular ui router).
I add this html code
<input class="form-control" change="onChange(date)" ng-model="date" placeholder="Select a date..." format= "DD/MM/YYYY" moment-picker="date">
and the onChange function is like this:
$scope.onChange = function(date){
var date = moment(date, "DD/MM/YYYY");
$state.go('list', {day: date.get('date'), month: (date.get('month')+1), year: date.get('year')})
}
But In console I have this error
VM3314:27 TypeError: Cannot read property 'removeChild' of null at close (angular-moment-picker.min.js:formatted:299) at angular.js:20440 at e (angular.js:6362) at angular.js:6642
VM3314:27 TypeError: Cannot read property 'removeChild' of null at close (angular-moment-picker.min.js:formatted:299) at angular.js:20440 at e (angular.js:6362) at angular.js:6642 "Possibly unhandled rejection: {}"
I discover that delaying the $state.go function is enogh to avoid this error.