Open voidsteed opened 7 years ago
i am fixing other issues, i will check this as well and fix it
@voidsteed try update your repository. It's fixed now.
Thank you @pablorsk , I will check it out.
This issue is still there. It comes when you choose mode="date". There is one more issue. When you chose "close-on-select", picker do not return in the correct format.
This is the plunker url for demo where I have produced the issue. Please & resolve this issue. http://plnkr.co/edit/P94pfjosot1gOxcwp1Ui?p=preview
@mominsamir It seems the problem is in calender-date.js (line:63 and 64)
if(self.restrictToMinDate){
if(moment.isMoment(self.minDate)){
self.minDate = self.minDate.subtract(1, 'd'); // <- here
}else{
self.minDate = moment(self.minDate, self.format).subtract(1, 'd'); //<- and here
}
}
Changing to code below, the problem is fixed, but I do not know if it causes another problem, I did some tests it seems that everything is ok, what do you think? Can I send a pull request?
if(self.restrictToMinDate){
if(moment.isMoment(self.minDate)){
self.minDate = self.minDate;
}else{
self.minDate = moment(self.minDate, self.format);
}
}
fixed #124
+1
I'm using date range picker, with my own variable in controller, every time when I select a range and click save button, the call back function returns previous date range I picked when I'm using console.log to print in controller, but in UI views it shows the current date range I picked.