This repository was archived by the owner on Jun 28, 2026. It is now read-only.
Fix #8052 year not updated with viewDate changes#8134
Closed
ulgyd0gg wants to merge 3 commits into
Closed
Conversation
Contributor
Author
|
I aslo realize |
Contributor
Author
|
I sincerely apologize for including previous commit messages in this PR. As a GitHub beginner, I would greatly appreciate your guidance on how to properly handle this situation. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #8052
The issue occurred when we set the view date and deleted the input field. The
currentYearvariable retained the old value (in this case, 2000).primereact/components/lib/calendar/Calendar.js
Lines 3391 to 3393 in d57bbb7
I adjusted displayYear to use metaYear, which fixes the issue, and the yearNavigator works correctly. However, if we modify the value of InputRef.current.value in a way that it cannot be parsed as a Date, the rendering will fall back to using ViewDate as the parameter.