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

Calendar navigator skips one month #1388

Closed
xAl3xFx opened this issue May 31, 2020 · 4 comments
Closed

Calendar navigator skips one month #1388

xAl3xFx opened this issue May 31, 2020 · 4 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@xAl3xFx
Copy link

xAl3xFx commented May 31, 2020

[ X ] bug report
[ ] feature request
[ ] support request

Current behavior
When the current month has 31 days and the next/previous have only 30, then when you use the navigation arrows for next/prev month it skips one month. For example today is 31.05.2020 and June has only 30 days so when I click the right navigation arrow of the calendar component the presented month is July instead of June.

Expected behavior
I expect that no matter how many days next month has, the calendar should not skip any months.

Minimal reproduction of the problem with instructions
https://primefaces.org/primereact/showcase/#/calendar
Here you can easily reproduce the problem.

@mertsincan mertsincan added the Resolution: Cannot Replicate Issue could not be replicated by Core Team label Jun 1, 2020
@mertsincan
Copy link
Member

mertsincan commented Jun 1, 2020

Hi,

Unfortunately, I couldn't replicate this issue. Could you please attach a gif or video to replicate?

@xAl3xFx
Copy link
Author

xAl3xFx commented Jun 1, 2020

I see you can not replicate it, today I can not either. It is because when you press the arrow for the next month it takes new Date() and adds one month to it. So today (01.06.2020) - June has 30 days so when you click the arrow it successfully chooses July. Unfortunately yesterday i did'not make gif and today I can not replicate it. I think that this bug will occur again on 31st of August because August has 31 days and then September only have 30. Hope you will fix it.

@mertsincan
Copy link
Member

Good catch! Replicated now.

@mertsincan mertsincan added Type: Bug Issue contains a defect related to a specific component. and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jun 3, 2020
@mertsincan mertsincan self-assigned this Jun 3, 2020
@mertsincan mertsincan added this to the 4.3.0 milestone Jun 3, 2020
@mertsincan mertsincan modified the milestones: 4.3.0, 4.2.2 Jun 8, 2020
@xAl3xFx
Copy link
Author

xAl3xFx commented Jul 31, 2020

Hello, the bug is fixed. Thank you guys 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants