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

Fix prev/next year buttons in monthSelect (#2275) #2276

Merged
merged 3 commits into from
Sep 16, 2020

Conversation

rlue
Copy link
Contributor

@rlue rlue commented Sep 15, 2020

This commit removes a needless restriction in the click handling logic
on the monthSelect plugin's prev/next year buttons:

  • the prev. year button would only decrement the year
    after selecting January, and
  • the next year button would only increment the year
    after selecting December.

It also adds a test to protect against regressions of this bug.

Additional commits

The bugfix is preceded by a commit that rearranges the test files to match the file structure of the source files they test.

This commit removes a needless restriction in the click handling logic
on the monthSelect plugin's prev/next year buttons:

* the prev. year button would only decrement the year
  after selecting January, and
* the next year button would only increment the year
  after selecting December.

It also adds a test to protect against regressions of this bug.
@rlue rlue force-pushed the bugfix/monthSelect/inc-dec-year branch from b2fd7f2 to d93f163 Compare September 16, 2020 03:40
@chmln chmln merged commit 83423da into flatpickr:master Sep 16, 2020
@chmln
Copy link
Member

chmln commented Sep 16, 2020

great work @rlue, appreciate the unit test too 🚀

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

Successfully merging this pull request may close these issues.

2 participants