DateBox: Preserve selected date part after focusout + focusin (T1318439)#32163
Merged
r-farkhutdinov merged 1 commit intoDevExpress:26_1from Jan 12, 2026
Merged
Conversation
a73909f to
f2fd1da
Compare
Contributor
There was a problem hiding this comment.
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_focusOutHandlerto preserve the active part index on focus out - Modified
_enterHandlerto select the first part when all text is selected, otherwise advance to the next part - Added type annotations for
_enterHandlerand_focusOutHandlerparameters - 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 |
marker-dao
approved these changes
Jan 12, 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.
No description provided.