-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix #6737 Calendar month navigator #6739
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
@@ -480,6 +480,7 @@ export const Calendar = React.memo( | |||
const currentViewDate = getViewDate(); | |||
let newViewDate = cloneDate(currentViewDate); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
Defect Fixes
Fix #6737 Ensure the day of the date is reset before updating the calendar. The 'navBackward' and 'navForward' methods reset the date to the first day to prevent this bug. If the line 'newViewDate.setDate(1)' is removed, the same error observed with the options will occur.