Abramodj Abramodj - 3 days ago 6
Android Question

Dialog datePicker bounds - Android

I'm using a datePicker dialog to pick the date, and I must set a lower and an upper bound. How can i do this?
Should I use the

public void onDateChanged(DatePicker view, int year, int month, int day)
method?

Please be explicit because I'm working with Android from 4 days only!

Answer

I suppose a DatePicker can NOT have a bound range. But you can check the date picked by user yourself. And if the date is invalid, you can alert the user.

Comments