fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 372 forks source link

TypeError: Cannot read property 'startDate' of null #223

Closed bmickoski closed 5 years ago

bmickoski commented 7 years ago

I see that there is open issue for this problem:

https://github.com/fragaria/angular-daterangepicker/pull/136

So why you guys don't merge this? Is there some other fix for this?

barbossa commented 7 years ago

+1

ghost commented 7 years ago

+1

tomergev commented 7 years ago

+1

SaiPhaniKnappily commented 7 years ago

+1

HGeo commented 6 years ago

+1

oles-bolotniuk commented 5 years ago

Issue still exists because this lib isn't maintained. In our project I fixed this by exposing model date and options objects to the controller scope:

View:

<div
  date-range-picker
  ng-model="date"
  options="options"
></div>

Controller:

$scope.options = {
  showDropdowns: true,
  opens: 'left',
  drops: 'down',
  applyClass: 'btn-primary'
};

$scope.date = {
  startDate: moment(),
  endDate: moment()
};