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

[Material DatePicker] Year selection issue

Open
#3,514 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: DatePicker
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** I am facing issue in Material Date picker while selecting year. It is selecting wrong year instead of selecting correct one. For Example if I am selecting year 1998 it is selecting 2001. Also it always pick 3 year later then selected one.

**Expected behavior:** It should pick correct year which is picked by user.

**Source code:** The code snippet which is causing this issue is as below

![image](https://github.com/material-components/material-components-android/assets/53334370/bba3453c-e528-48bc-9a84-73107fb1ac00)

**Android API version:** androidx.core:core-ktx:1.10.1

**Material Library version:** com.google.android.material:material:1.9.0

**Device:** All devices but firstly it is encountered in android 14 in emulator.

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

Reproduce the Material DatePicker year-selection problem using the versions and Android 14 emulator details in the issue, then trace the year-selection entry point referenced by its source snippet. Confirm that choosing a year such as 1998 produces that exact year rather than one three years later, and add or update coverage where the existing DatePicker tests exercise this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
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.