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.
More Related Contents:
- Jelly Bean DatePickerDialog — is there a way to cancel?
- Get date from datepicker using dialogfragment
- Android Material Design Inline Datepicker issue
- How set maximum date in datepicker dialog in android?
- Datepicker: How to popup datepicker when click on edittext
- Datepicker dialog without calendar visualization in lollipop [spinner mode]?
- Set Limit on the DatePickerDialog in Android?
- How to transfer the formatted date string from my DatePickerFragment?
- DatePicker shows wrong value of month
- Multiple DatePickers in same activity
- Android – OnDateChangedListener – how do you set this?
- Set language to French in android DatePickerDialog
- Android DatePickerDialog: Set min and max date for selection
- How to disable dates before today date in DatePickerDialog Android?
- MaterialDatePicker get selected dates
- How to set minimum DatePicker date to current date
- Android datepicker min max date before api level 11
- Android: How to change the DatePicker view date format from MM/dd/yyyy to dd/MM/yyyy?
- How to get the date from the DatePicker widget in Android?
- How to change the default color of DatePicker and TimePicker dialog in Android?
- How do I detect a cancel click of the datepicker dialog?
- Disable specific dates of day in Android date picker
- Android Calendar View for Date Picker
- Android Material Design Datepicker with AppCompat
- Hide Year field in Android DatePicker?
- How to disable certain dates in the Android Date Picker dialog?
- How to change the style of a DatePicker in android?
- What is Jetifier?
- onTaskRemoved() not getting called in HUAWEI and XIAOMI devices
- View Binding – How do I get a binding for included layouts?