I have been stuck on this issue for the last two days. My issue is this: how can I display the date from one week to another week (Thursday to Thursday)? For example:
<
In your case, setMaxDate() is your friend. The docs say:
Sets the maximal date supported by this DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault() time zone.
So, get the time of the next week as long
and use the method.
Have a look here Set Limit on the DatePickerDialog in Android?