This question describes how to do it using a DatePicker widget, but I haven't got anything like that.
I have these:
@Override
protected Dialog onCreateDialog(int id)
{
switch (id)
{
case DATE_DIALOG_ID:
return new DatePickerDialog(this, mDateSetListener, mYear1, mMonth1, mDay1);
case DATE_DIALOG_ID_2:
return new DatePickerDialog(this, mDateSetListener2, mYear2, mMonth2, mDay2);
case DATE_DIALOG_ID_3:
return new DatePickerDialog(this, mDateSetListener3, mYear3, mMonth3, mDay3);
}
return null;
}
protected void onPrepareDialog(int id, Dialog dialog)
{
switch (id)
{
case DATE_DIALOG_ID:
((DatePickerDialog) dialog).updateDate(mYear1, mMonth1, mDay1);
break;
case DATE_DIALOG_ID_2:
((DatePickerDialog) dialog).updateDate(mYear2, mMonth2, mDay2);
break;
case DATE_DIALOG_ID_3:
((DatePickerDialog) dialog).updateDate(mYear3, mMonth3, mDay3);
break;
}
}
and then three DatePickerDialog.OnDateSetListener() s
There is no setMax() or setMin() on these DatePickerDialogs.
Thanks in advance.