material-components / material-components/material-components-android

[DatePicker] Support Custom date input hint

Open
#2,146 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Good First Issue Widget: DatePicker
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Currently I believe we can't set the hint as we want. We only able to change it by overriding the word using these strings res
```
y
m
d
```
but we need to follow the defined format dd/mm/yy.

**Describe the solution you'd like**
It would be nice to have if we can set the custom hint as we want maybe from dd/mm/yy to Day/Month/Year

**Describe alternatives you've considered**
Set the string res that won't printed as double word i.e I put d it will become dd, if I want to put Day it will printed as DayDay.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Android DatePicker text-input implementation and the existing mtrl_picker_text_input_year_abbr, month_abbr, and day_abbr string resources. Check how those resources produce repeated hints, then define the expected behavior for custom formats such as dd/mm/yy and Day/Month/Year; done means the requested hint can be customized without duplicated words.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.