I have a date picker which has min and max date to select. Even though the past and future dates are not selectable(disable), they are still displayed if we scroll. Is there any way to fix this? Thank you.
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
PostInfo.this,
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)+1
);
dpd.setMinDate(Calendar.getInstance());
now.add(Calendar.DAY_OF_MONTH, 30);
dpd.setMaxDate(now);
dpd.show(getFragmentManager(), "Datepickerdialog");