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
When a date picker is opened on the 31st of a month which precedes a month with only 30 days (e.g. 2017-08-31), clicking the right-arrow to move to the next month causes a jump by 2 months.
What were you expecting?
I would expect a more natural behaviour would be to jump to the last day of the next month (i.e. in this case 2017-09-30)
This problem seems to stem from the javascript implementation of setMonth(). Try this in a browser console:
d = new Date('2017-08-31')
d.getMonth() // 7
d.setMonth(8)
d.getMonth() // 9
I'm working on a PR for fixing this, but it's not obvious—I'm not sure quite how the setMonth() function in InlineDatetimeMat.vue works—this.month is 1–based, whereas the javascript Date().setMonth() is 0–based. Need to look closer and out of time right now.
The text was updated successfully, but these errors were encountered:
Software version
Quasar: 0.14
Browsers: Vivaldi 1.11.894.3 (Official Build) (64-bit)
What did you get as the error?
When a date picker is opened on the 31st of a month which precedes a month with only 30 days (e.g. 2017-08-31), clicking the right-arrow to move to the next month causes a jump by 2 months.
What were you expecting?
I would expect a more natural behaviour would be to jump to the last day of the next month (i.e. in this case 2017-09-30)
This problem seems to stem from the javascript implementation of
setMonth()
. Try this in a browser console:I'm working on a PR for fixing this, but it's not obvious—I'm not sure quite how the
setMonth()
function inInlineDatetimeMat.vue
works—this.month
is 1–based, whereas the javascriptDate().setMonth()
is 0–based. Need to look closer and out of time right now.The text was updated successfully, but these errors were encountered: