Skip to content

Conversation

DRiFTy17
Copy link
Collaborator

@DRiFTy17 DRiFTy17 commented Jul 1, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: Y
  • Docs have been added/updated: N
  • Does this PR introduce a breaking change? N
  • I have linked any related GitHub issues to be closed when this PR is merged? Y

Describe the new behavior?

When clicking the today button (or using keyboard shortcuts) the date value for the current day will no longer include a timestamp by default.

The calendar itself removes the timestamp already, but since the date-picker and date-range-picker both handle the "today" logic separately by creating a new Date objects, each needed to remove the timestamp as well.

It's important to remember that due to the changes made in #688, if there is a Date already set that contains a timestamp, that timestamp will be preserved because we then attempt to merge the new "today" date with the existing date value... This is done to avoid inadvertently removing the timestamp on a Date object if developers have the timestamp set in their model value, and there is an expectation already set in these components that it will not remove that timestamp. For developers not using timestamps, this should now be fixed and timestamps will be removed.

Additional information

Fixes #943

@DRiFTy17 DRiFTy17 requested a review from a team as a code owner July 1, 2025 13:53
@DRiFTy17 DRiFTy17 added the patch Increment the patch version when merged label Jul 1, 2025
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@DRiFTy17 DRiFTy17 merged commit b97c53a into main Jul 1, 2025
13 checks passed
@DRiFTy17 DRiFTy17 deleted the fix-date-picker-today-time branch July 1, 2025 17:05
Copy link
Contributor

github-actions bot commented Jul 2, 2025

🚀 PR was released in v3.9.2 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[date-picker] Clicking "Today" on an empty date picker sets the time
2 participants