Skip to content

Commit

Permalink
fix for flatpickr#2669, initialisation of the monthSelectPlugin alway…
Browse files Browse the repository at this point in the history
…s set currentmonth to 0, not the actual selected month
  • Loading branch information
Casper de Groot authored and Casper de Groot committed Mar 20, 2022
1 parent 614568f commit 2d7bf2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/monthSelect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ function monthSelectPlugin(pluginConfig?: Partial<Config>): Plugin {
function stubCurrentMonth() {
config._stubbedCurrentMonth = fp._initialDate.getMonth();

fp._initialDate.setMonth(0);
fp.currentMonth = 0;
fp._initialDate.setMonth(config._stubbedCurrentMonth);
fp.currentMonth = config._stubbedCurrentMonth;
}

function unstubCurrentMonth() {
Expand Down

0 comments on commit 2d7bf2a

Please sign in to comment.