Skip to content

Commit

Permalink
Fix #2948: Calendar monthpicker incorrect month on 1st click (#2950)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored May 31, 2022
1 parent 75592f4 commit 485dc2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ export const Calendar = React.memo(React.forwardRef((props, ref) => {
setCurrentMonth(month);
createMonthsMeta(month, currentYear);
const currentDate = new Date(getCurrentDateTime().getTime());
currentDate.setDate(1); // #2948 always set to 1st of month
currentDate.setMonth(month);
currentDate.setYear(currentYear);

Expand Down

0 comments on commit 485dc2a

Please sign in to comment.