Closed danillocesar closed 6 years ago
@danillocesar Works fine on my firefox Windows, I have no mac yet to test it but I'll find a way to test on Mac Safari/Firefox
That's weird. Here's what happens on my firefox and on my clients.
It takes a lot of time to load then firefox ask me to shut it down because some script is taking too long to run, probably in some kinda of a infinite loop.
I'll Investigate it
I'm in Brazil, if that helps. From what i've seen, its on a method that change the time of the calendar.. its possiblem that the region is interfering?
@danillocesar Can you execute this script on your firefox then post the log result here?
function getFirstDayOfWeek() {
return 1;
}
var currentDate = new Date(),
monthStartDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1),
monthEndDate = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0),
calendarStartDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1 - (monthStartDate.getDay() == 0 ? 6 : (monthStartDate.getDay() - getFirstDayOfWeek()))),
calendarEndDate = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 7 - (monthEndDate.getDay() - getFirstDayOfWeek())),
calendar = calendarStartDate;
console.log(calendar, calendarEndDate);
Date 2017-08-28T03:00:00.000Z Date 2017-10-02T03:00:00.000Z
That's the result
Got similar issue on Brazil timezone https://discussions.apple.com/thread/2715555?tstart=0 I'll continue investigating this Thanks @danillocesar
@danillocesar A recent release related to your issue has been addressed, can you verify on demo page if still having the existing issue? https://ipiz.herokuapp.com/md-date-range-picker-demo/index.html
@ipiz same problem, line is 334
while (calendar < calendarEndDate) { dates.push(calendar); calendar = new Date(calendar.getFullYear(), calendar.getMonth(), calendar.getDate() + 1); }
@danillocesar could you try another shot testing https://ipiz.herokuapp.com/md-date-range-picker-demo/index.html on your browser? I updated the demo to use the latest build i mate which limit the loop for possible infinite loop.
Regards...
@ipiz yes, its not crashing now.. can i update my project with the new build?
I can publish a new release with the fix 0.6.3
You can now update your dependency version to 0.6.3 or get the latest build Regards...
Just open the demo page on those browser and you will see..
Any quick fix for that?