ng-bs-daterangepicker
ng-bs-daterangepicker copied to clipboard
Support manual, via input text, date manipulation.
Taking a look at Dan's original Bootstrap version, you can see the input field allows for manual date alteration.
This seems particularly useful if you commonly need large ranges, spanning several years.
Just move the ngModel.$setViewValue() and ngModel.$render() functions into the 'apply.daterangepicker' callback function. Like this:
$element.on('apply.daterangepicker', function(ev, picker) {
console.log("Applied");
ngModel.$setViewValue({
'startDate': picker.startDate,
'endDate': picker.endDate
});
ngModel.$render();
});