Skip to content

fix(ui5-calendar): select correct day in other month#13786

Open
didip1000 wants to merge 3 commits into
mainfrom
cal-focus-date
Open

fix(ui5-calendar): select correct day in other month#13786
didip1000 wants to merge 3 commits into
mainfrom
cal-focus-date

Conversation

@didip1000

@didip1000 didip1000 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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 the click event fires. The click handler then reads the outdated data-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 _onmousedown instead 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

@didip1000 didip1000 temporarily deployed to netlify-preview July 6, 2026 10:40 — with GitHub Actions Inactive
@didip1000 didip1000 requested a review from GDamyanov July 6, 2026 10:40
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

GDamyanov
GDamyanov previously approved these changes Jul 6, 2026
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.

[Calendar | Date Picker]: Incorrect selected date while month range change

2 participants