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

changeMonth(x) will display wrong date if the x >12 #565

Closed
max-yilang opened this issue Jan 19, 2017 · 1 comment
Closed

changeMonth(x) will display wrong date if the x >12 #565

max-yilang opened this issue Jan 19, 2017 · 1 comment

Comments

@max-yilang
Copy link

Expected Behavior

Expect the calendar to display correct date and year.

Current Behavior

The calendar display correct month however the year is incorrect.

Steps to Reproduce (for bugs)

1.use changeMonth(x) on any flatpickr instance
2.when x > 12, both the month and the year increased.For example when x = 14, the calendar display March 2020 instead of March 2018.

Your Environment

  • Version used:v2.3.4
  • Browser Name and version:Chrome and Safari
  • Operating System and version (desktop or mobile):Mac OS El Capitan and iOS 10
@max-yilang
Copy link
Author

Just found a temporary solution if you increase month by x

for(let i = 0;i<x;i++){
                flatpicker.changeMonth(1);
            }

@chmln chmln closed this as completed in f485018 Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant