Skip to content

DateBox: Preserve selected date part after focusout + focusin (T1318439)#32163

Merged
r-farkhutdinov merged 1 commit intoDevExpress:26_1from
r-farkhutdinov:26_1_T1318439
Jan 12, 2026
Merged

DateBox: Preserve selected date part after focusout + focusin (T1318439)#32163
r-farkhutdinov merged 1 commit intoDevExpress:26_1from
r-farkhutdinov:26_1_T1318439

Conversation

@r-farkhutdinov
Copy link
Copy Markdown
Contributor

No description provided.

@r-farkhutdinov r-farkhutdinov self-assigned this Jan 12, 2026
@r-farkhutdinov r-farkhutdinov marked this pull request as ready for review January 12, 2026 13:12
@r-farkhutdinov r-farkhutdinov requested a review from a team as a code owner January 12, 2026 13:12
Copilot AI review requested due to automatic review settings January 12, 2026 13:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a bug (T1318439) where the DateBox component would not preserve the selected date part after the user focuses out and then focuses back into the input field. The fix ensures that the active date part (e.g., year, month, day) remains selected when returning focus to the component.

Changes:

  • Removed _selectFirstPart() call from _focusOutHandler to preserve the active part index on focus out
  • Modified _enterHandler to select the first part when all text is selected, otherwise advance to the next part
  • Added type annotations for _enterHandler and _focusOutHandler parameters
  • Added comprehensive test case to verify the fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts Removed _selectFirstPart() call from focusout handler and updated Enter key behavior to handle all-text-selected case, plus added TypeScript type annotations
packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js Added test case verifying that the selected date part is preserved after focusout and focusin

@r-farkhutdinov r-farkhutdinov merged commit cdfbe1b into DevExpress:26_1 Jan 12, 2026
121 of 123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants