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

[MaterialDatePicker] OnSelectionChangedListener and DateSelector are not accessible.

Open
#1,727 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Description:** Trying to implement custom DateSelector. but it shows error as

**_"com.google.android.material.datepicker.OnSelectionChangedListener' is not public in 'com.google.android.material.datepicker'. Cannot be accessed from outside package"_**

and

**_"DateSelector can only be accessed from within the same library group (groupId=com.google.android.material)"_**

**Expected behavior:** Basically I want the same behavior as SingleDateSelector or RangeDateSelector

**Material Library version:** 1.3.0-alpha02

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 with the public accessibility of OnSelectionChangedListener and DateSelector in the material datepicker package, using the reported 1.3.0-alpha02 behavior as the baseline. Review how SingleDateSelector and RangeDateSelector expose the expected behavior, then define and verify the public API needed for a custom DateSelector.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.