You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select the next month.
The month selector will show the next month, but the picker will show a calendar for the month after that.
This is caused by the following code in picker.js: this.month.addEventListener(change, ()=> { this.date.setMonth(this.month.value); this.refreshDaysMatrix(); });
setMonth will update the month, but the next month has only 30 days. The Date object will now represent the first of the month after the next month.
An easy fix is: this.month.addEventListener(change, ()=> { this.date.setMonth(this.month.value, 1); this.refreshDaysMatrix(); });
This makes sure that setMonth sets the Date object to the first of the next month. See also https://stackoverflow.com/questions/14680396/the-date-getmonth-method-has-bug
Apparently the problem does not happen in Chrome. It does happen in Safari.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
The month selector will show the next month, but the picker will show a calendar for the month after that.
This is caused by the following code in picker.js:
this.month.addEventListener(
change, ()=> { this.date.setMonth(this.month.value); this.refreshDaysMatrix(); });
setMonth will update the month, but the next month has only 30 days. The Date object will now represent the first of the month after the next month.
An easy fix is:
this.month.addEventListener(
change, ()=> { this.date.setMonth(this.month.value, 1); this.refreshDaysMatrix(); });
This makes sure that setMonth sets the Date object to the first of the next month. See also https://stackoverflow.com/questions/14680396/the-date-getmonth-method-has-bug
Apparently the problem does not happen in Chrome. It does happen in Safari.
The text was updated successfully, but these errors were encountered: