vue-rangedate-picker
vue-rangedate-picker copied to clipboard
January 1, 2019 fell on a Tuesday
Hello,
January 1, 2019 fell on a Tuesday
In the component this appears as Monday
this can be fixed by changing startNextMonthDay on rangedate-picker.js for
if (this.startNextActiveMonth > 0) {
return new Date(this.activeYearStart, this.startNextActiveMonth, 1).getDay()
} else {
return new Date(this.activeYearStart + 1, this.startNextActiveMonth, 1).getDay()
}
I´ll send a PR
We fixed this by adjust all the Date.UTC(...) nonsense that is going on.
return new Date(Date.UTC(this.activeYearStart, this.startNextActiveMonth, 1)).getDay(); // fails
return new Date(this.activeYearStart, this.activeMonthStart, 1, 0, 0, 0).getDay(); // good