How to Disable future dates in Android date picker

Get the DatePicker from DatePickerDialog with getDatePicker(). Set the max date to current date with setMaxDate():

mDatePicker.getDatePicker().setMaxDate(System.currentTimeMillis());

Requires API level 11.

Leave a Comment