There's a bug on Android L that even if a min and max date is set, user can still select disabled dates.
I've already filed an issue here, but I'm wondering is there's any solution to fix this before next android system update?
There's a bug on Android L that even if a min and max date is set, user can still select disabled dates.
I've already filed an issue here, but I'm wondering is there's any solution to fix this before next android system update?
Here the perfect answer for you. Please, Refer ozbek's answer. Code is like below, In case if above link will get break in future.
DatePickerDialog dialog = new DatePickerDialog(this, pDateSetListener, pYear, pMonth, pDay);
dialog.getDatePicker().setMaxDate(new Date().getTime());
Do same for setminDate()
.
Enjoy..!