material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[MaterialDatePicker] Add a optional 'Clear' button

Open DvTonder opened this issue 3 years ago • 21 comments

Adds an optional 'Clear' button that be used to remove the user selected date as described in #1332

closes #1332

DvTonder avatar Sep 13 '21 21:09 DvTonder

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Sep 13 '21 21:09 google-cla[bot]

@googlebot I signed it!

DvTonder avatar Sep 17 '21 23:09 DvTonder

I didn't see the change. Did you forget to commit?

drchen avatar Oct 08 '21 14:10 drchen

I didn't see the change. Did you forget to commit?

Have not committed yet. Am toying with the implementation to experiment with different UXs

DvTonder avatar Oct 09 '21 16:10 DvTonder

New changes are loaded though I think I made a mistake of force pushing rather than a new commit. Either way, this new implementation addressed the comments from @drchen and changes the implementation to allow for the clear button to optionally dismiss the dialog when clicked vs. just clearing the current selection.

DvTonder avatar Oct 09 '21 17:10 DvTonder

New changes pushed based on @drchen feedback. All except last comment applied.

DvTonder avatar Oct 11 '21 14:10 DvTonder

Thank you!

DvTonder avatar Oct 11 '21 15:10 DvTonder

Hi there, sorry for the delay. Do you mind resolving the new conflicts so I can review and confirm with @drchen and submit.

josefigueroa168 avatar Dec 01 '21 21:12 josefigueroa168

@josefigueroa168 done as requested. Thank you.

DvTonder avatar Dec 01 '21 22:12 DvTonder

Is there a possibility of this making it into 1.6?

I'm really hoping to be able to remove all the copied DatePicker code from my app

DvTonder avatar Jan 29 '22 18:01 DvTonder

@DvTonder, thanks again for the PR. Could you try to squash all your commits into one? I have some difficulties to pull your PR into internal repo. I think the merge master commits causes some change mapping issues.

pekingme avatar Jan 31 '22 23:01 pekingme

@pekingme I will see if I can figure it out.

DvTonder avatar Feb 01 '22 02:02 DvTonder

Single commit squashed change pull request sitting at #2542

This obviates the need for this pull request

DvTonder avatar Feb 01 '22 03:02 DvTonder

Thanks for working on this so quickly, @DvTonder. But it still doesn't work. When pulling a PR into Google internal repo, all the commits are considered as one change. The "merge master" creates a lot of conflicts. Could you rebase to the head instead of merging the master? Sorry for the inconvenience.

pekingme avatar Feb 01 '22 06:02 pekingme

@pekingme I'm not sure how to do what you are asking. I'm thinking easiest will be to copy the changed files to disk somewhere, delete my repo / fork altogether, then re-fork from the source and re-add the changed files I saved copies of as a new commit on the new fork and do a pull request. Is that how to do it?

DvTonder avatar Feb 01 '22 17:02 DvTonder

@DvTonder Thanks for trying. I'll do something similar on my end. Will delete the new PR you just created and associate the changes with this PR.

pekingme avatar Feb 01 '22 19:02 pekingme

@pekingme I'm standing by if you want me to try as well. I can do so this evening.

DvTonder avatar Feb 01 '22 20:02 DvTonder

@DvTonder I managed to pull it into the internal repo. During the internal review, we noticed that we need some feedback from design for full-screen use case. Stay tuned.

pekingme avatar Feb 02 '22 19:02 pekingme

It's been 3 months since the last update on this. Any news?

DvTonder avatar May 06 '22 08:05 DvTonder

Hi @DvTonder,

I confirmed with our designers. They are aware of the request and adding the clear button in the new design - yes they are working on a minor revamp of the date picker design. I'm sorry for the long wait - please stay tuned.

drchen avatar May 11 '22 14:05 drchen

Good afternoon. This is my regular, 3 monthly, check-in on this topic.

I see many commits in recent weeks for Date and Time picker. Dare I hope that this feature is also in the backlog?

DvTonder avatar Aug 30 '22 17:08 DvTonder

Hey guys, When can I see this "CLEAR" button from official release?

z4hyoung avatar Nov 23 '22 01:11 z4hyoung