-
Notifications
You must be signed in to change notification settings - Fork 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
Calendar: Selection Month DropDown Item at Index 1 for the first time, Selects Item at Index 2 #2948
Comments
Confirmed using the Showcase: https://primefaces.org/primereact/calendar/ |
I am still Facing the same issue! I have manually changed in Calendar.js file |
I can't reproduce with my fix. So the issue is today is May 31st. So when it gets that date its setting Month to 1 making it "Feb 31st" of which there is no such thing so it makes it "March 03". My fix sets the view date to the first of the month every time so May 31st becomes May 01 then sets the month to Feb 01. |
Thank you @melloware for the Fix! I have verified it and working fine for me too! |
Excellent! Thanks for reporting and tested. I guess we were bound to run into this scenario eventually where the day was between 28-31st of hte month and someone tried to switch to February! |
Describe the bug
Hey There, I am facing one issue in latest installed versions.
The issue is that I have used Calendar control which has Month and Year Dropdowns.
In Month Dropdown, I have Values from January till December
The problem is that For the First Click in this dropdown, If I select February(at Index 1), It selects March(at Index 2).
This Problem is only faced for the first click.
Please Resolve this in Some Older Versions also!
Please resolve this ASAP!
Reproducer
No response
PrimeReact version
8.1.1
React version
17.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 101.0.4951
Steps to reproduce the behavior
Expected behavior
The text was updated successfully, but these errors were encountered: