I\'m using the datePicker and I can disable last days of today and later days after 30 days by the following code:
DatePickerDialog datePicker = new DatePick
That is not possible with the android datepicker and you need to create a custom picker for yourself. See MaterialDateTimePicker
To disable Sundays you have to pass the array like this
GregorianCalendar g1=new GregorianCalendar();
g1.add(Calendar.DATE, 1);
GregorianCalendar gc = new GregorianCalendar();
gc.add(Calendar.DAY_OF_MONTH, 30);
List dayslist= new LinkedList();
Calendar[] daysArray;
Calendar cAux = Calendar.getInstance();
while ( cAux.getTimeInMillis() <= gc.getTimeInMillis()) {
if (cAux.get(Calendar.DAY_OF_WEEK) != 1) {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(cAux.getTimeInMillis());
dayslist.add(c);
}
cAux.setTimeInMillis(cAux.getTimeInMillis() + (24*60*60*1000));
}
daysArray = new Calendar[dayslist.size()];
for (int i = 0; i