ng-bs-daterangepicker icon indicating copy to clipboard operation
ng-bs-daterangepicker copied to clipboard

Support manual, via input text, date manipulation.

Open bdjnk opened this issue 11 years ago • 1 comments

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.

bdjnk avatar Nov 27 '13 22:11 bdjnk

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();
    });

zhenyi2697 avatar Mar 31 '15 10:03 zhenyi2697