i am using this code to show alert dialog...when i click on the ok button it should show the date picker..
protected Dialog onCreateDialog(int id) {
swit
you must have changed mYear, mMonth, mDay values. months are 0-11. make sure your values are in the range
Do you know that month field is zero based - starts from zero? Make sure that value for month does not exceed 11! I was getting exactly the same message and since I used 12 for a month, that was the reason to get this exception.
As indicated by the error you see in the logs, one of your mYear, mMonth or mDay values is invalid.
an idea to set the month field value to X is to set it to X % 12 (modulo), so then you are sure that you will not exceed the autorized value. Same for hours and minutes. Cheers. Charles.