Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker component duplicating/skipping months after year-click #1409

Closed
caseydwyer opened this issue Aug 18, 2017 · 6 comments
Closed

DatePicker component duplicating/skipping months after year-click #1409

caseydwyer opened this issue Aug 18, 2017 · 6 comments
Assignees
Labels
T: bug Functionality that does not work as intended/expected

Comments

@caseydwyer
Copy link

Steps to reproduce

  1. Visit https://vuetifyjs.com/components/pickers
  2. Click an old-ish year (eg, <=2005) at the top of either Example "once" in event listener option #1 component.
  3. Scroll via left/right arrow buttons to either a.) March/April or b.) October/November

Versions

Windows 10
Chrome 60.0.3112.90
Vuetify .14

What is expected ?

To see the April and November months.

What is actually happening ?

March and October are shown "again", in place of April and November (respectively). Note that the days on the second "iteration" of the month are correct, header/month is just off.

Reproduction Link

https://vuetifyjs.com/components/pickers

actual-october
should-be-november

@caseydwyer
Copy link
Author

Also worth noting: when you click a date in the incorrectly-labeled October (what should be November), the side-panel (ie, blue box) has the correct date. eg, I click "October" 16, and the left text shows:

2005
Wed,
Nov 16

@nekosaur nekosaur self-assigned this Aug 18, 2017
@nekosaur nekosaur added T: bug Functionality that does not work as intended/expected pending review The issue is still pending disposition labels Aug 18, 2017
@johnleider
Copy link
Member

This is due to the javascript Date object. You can test this yourself by creating a new Date object, let k = new Date('November 1 2005'). After you generate it, use k.getMonth(). It will return 10 when in fact it is actually 11. @nekosaur We might have to change back how we handle months.

@johnleider johnleider removed the pending review The issue is still pending disposition label Aug 19, 2017
@caseydwyer
Copy link
Author

Isn't that a result of getMonth() being zero-based? For me, the issue here only happens on those two specific "month-pairs"...March/April & October/November. If the issue was an off-by-one error, I'd think it would be consistently wrong. Am I turned around on that?

@johnleider
Copy link
Member

You're right, I was looking at something else. Gotta stop drinking.

@caseydwyer
Copy link
Author

HA! Been there before. 🍻

@lock
Copy link

lock bot commented Apr 16, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

3 participants