fix(ui5-calendar): select correct day in other month#13786
Open
didip1000 wants to merge 3 commits into
Open
Conversation
|
🚀 Deployed on https://pr-13786--ui5-webcomponents-preview.netlify.app |
GDamyanov
previously approved these changes
Jul 6, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue:
Clicking a date from the prev/next month would select the wrong date. On
mousedown, the calendar navigates to the prev/next month and re-renders before theclickevent fires. Theclickhandler then reads the outdateddata-sap-timestamp(whatever date that's currenlty at that grid position in the new month), and selects that instead of the originally clicked date.Solution:
Use the timestamp already set by
_onmousedowninstead of re-reading from the DOM on mouse clicks, and restore focus after the re-render when an other-month date was clicked.Fixes: #13760