[MaterialDatePicker] Selecting year causes displayed month to jump around
See original GitHub issueDescription: With November 2019 shown, when I click the down arrow next to the year, then select a different year, like 2020, the displayed month goes to August 2020, August 2021, December 2021, February 2021, August 2020 then April 2020
Expected behavior: It shows a month in 2020
Source code:
TextInputEditText fromDateLayout = view.findViewById(R.id.from_date);
fromDateLayout.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
MaterialDatePicker.Builder<Long> builder = MaterialDatePicker.Builder.datePicker();
builder.setTitleText("Date");
MaterialDatePicker<Long> picker = builder.build();
picker.show(getFragmentManager(), picker.toString());
}
}
});
Android API version: 29
Material Library version: 1.2.0-alpha01
Device: Android Emulator
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Angular Material Datepicker - Translate Month Label (inside of ...
Everything works fine exept of the month label. ... How can I translate label inside of the top left button (where you pick...
Read more >More Functionalities of Material Design Date Picker in Android
Functionality 4: Open the material date picker dialog at the specific month. For example, open the material date picker dialog in August month....
Read more >How can I jump to a given year on the Google Calendar ...
there's no way to do this in the Android app, but you can ask Google Assistant to list events from a given month...
Read more >Implementing a month picker with Angular Material
The calendar widget of the Angular Material date picker has three ... starts with selecting the month and allows you to choose the...
Read more >Designing The Perfect Date And Time Picker
If so, how do we design it for days, months and years? ... There is too much jumping around two date pickers when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, any chance you’d be able to provide a small sample that reproduces this issue? Looking into this in our catalog, I’m not able reproduce what you’ve described (or I don’t fully understand the issue you’re running in). It looks like selecting a a different year in the single date picker will smoothly scroll from Nov. 2019 to Nov. 2020.
Couldn’t reproduce using the sample app provided by @thirstycoda and updating the Material lib to version
1.5.0
. Please reopen if you’re still having issues.