0

I want to disable all previous dates in one date picker while i select a date in another date picker. Please don't put answer to disable all previous dates from current date. I want from selected date, not from current date.

Such as i selected 22Dec on first date picker, Now in second date picker, all previous dates from 22Dec should be disable.

Bhunnu Baba
  • 1,742
  • 15
  • 22
  • Please elaborate little more and show how you have tried to achieve this. – Android_id Dec 19 '20 at 10:30
  • Does this answer your question? [How to disable past dates in Android date picker?](https://stackoverflow.com/questions/23762231/how-to-disable-past-dates-in-android-date-picker) – LS_ Dec 22 '20 at 09:43
  • @LS_ no, please read once to my question carefully. – Bhunnu Baba Dec 22 '20 at 10:09
  • @BhunnuBaba You just need to adapt the code, but that's the solution. Implement `onDateSet` and use `datePicker.setMinDate()` to disable dates based on user's selection. – LS_ Dec 22 '20 at 10:12
  • may you put an example for getting date in onDateSet method and put it in seMinDate method for more clearance ? Thanks for your previous reply. – Bhunnu Baba Dec 22 '20 at 10:20

0 Answers0