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: display today button for currentDate even when code executes wit… #7597

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

suhailk4
Copy link
Contributor

@suhailk4 suhailk4 commented Jan 13, 2025

Fix #7598

Issue without this fix:
Today button is hidden when maxDate is passed as new Date().

Fix with the PR: Fixes the issue when maxDate is passed as new Date().
Since the code could executes at slightly different time intervals so currentDate in prime react component is always greater than new Date() passed from parent component hence condition executed for Today Button is true therefore Today Button is hidden

With this fix we will compare timeStamp upto minutes only (truncating seconds and milliseconds)

Defect Fixes

When submitting a PR, please also create an issue documenting the error and manually link to an issue or mention it in the description using #<issue_id>.

Feature Requests

Due to company policy, we are unable to accept feature request PRs with significant changes as such cases has to be implemented by our team following our own processes.
Smaller scaled feature implementations such as adding a property to a component will be considered for merging.

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 6:28pm
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 6:28pm

Copy link

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>.

@melloware
Copy link
Member

@suhailk4 can you open a new issue to link to this ticket or is there a ticket already existing?

@suhailk4
Copy link
Contributor Author

@suhailk4 can you open a new issue to link to this ticket or is there a ticket already existing?

Already did and linked that issue with this PR

@melloware
Copy link
Member

OK cool can you run npm run format to format the code.

@suhailk4
Copy link
Contributor Author

Done.
Formatted the code.
Thanks

@melloware melloware merged commit 595fb24 into primefaces:master Jan 13, 2025
4 checks passed
@melloware
Copy link
Member

Thanks! Marked for next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Today Button is hidden for maxDate with value as new Date()
2 participants