material-components / material-components/material-components-android
[Date picker] Text input mode: Cursor should be positioned at end of text field
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** In version 1.9.0, when opening DatePicker with text input mode and a default selection, the cursor was positioned at the end:

Since version 1.10.0 it is positioned at the beginning;

**Expected behavior:** For usability, it is preferable to position cursor at the end, since in order to delete the default selection, user must now change cursor position first.
**Minimal sample app repro:** The issue can be reproduced with the Catalog app -> Date Picker. Set Default Selection to Today, and Input Mode to Text Input.
The problem seems to have been introduced with commit 4032a741127b4715c3bbcd4cab08494b39ae5bdb
**Android API version:** API 32
**Material Library version:** Since 1.10.0
**Device:** Emulator
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the Catalog app's Date Picker with Default Selection set to Today and Input Mode set to Text Input. Inspect commit 4032a741127b4715c3bbcd4cab08494b39ae5bdb and the related date-picker code. Done means the cursor is positioned at the end of the preselected text, matching the behavior in version 1.9.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100