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 #6737 Calendar month navigator #6739

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export const Calendar = React.memo(
const currentViewDate = getViewDate();
let newViewDate = cloneDate(currentViewDate);
Copy link
Contributor Author

@KirilCycle KirilCycle Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can i simply use new Date(), as in previous commit ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this looks good if you look down in the calendar you will see we do this...

currentDate.setDate(1); // #2948 always set to 1st of month

So clearly this spot was missed.


newViewDate.setDate(1);
newViewDate.setMonth(parseInt(value, 10));

updateViewDate(event, newViewDate);
Expand Down
Loading