fragaria / angular-daterangepicker

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

Problem updating range #229

Closed edyluro closed 5 years ago

edyluro commented 7 years ago

Hi, I have a range picker and several ranges, Today, Last Month and so on, so i can update a graph with the dates selected, now the problem is that I want to make a search of the object in my graph, say projects, so i can find the earliest project and select that as start date, when I have those I want to create a new range in my day picker and update those values, say $scope.options.range.push('Projects', [earliestProject, earliestProject , latestProject]). All of this is in the init, but after everything is loaded i got a dateRangePicker, with my new range Projects selected but nothing in it (the initial values, [moment(), moment()]). Then I select another range like "Last Month" and when I return to "Projects" range it has the correct values. I suppose it is some method that im not calling after i update my range to let my view know that i have updated the range but I dont know what method. tl:dr = Is there a method to update my view after I create a new range?