datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

onDateSet returns 1 month earlier

Open avielg opened this issue 9 years ago • 2 comments

When the method gets called the day and year params are fine but month is always 1 less than what I chose. e.g., I choose August and get 7 in onDateSet for the month parameter...

Currently I solved it with a simple and ugly month++;, but I was wondering if this is a bug or am I missing something here...?

avielg avatar Mar 15 '15 15:03 avielg

The months are in the range 0-11 for compatibility with Calendar. See also http://developer.android.com/reference/android/app/DatePickerDialog.OnDateSetListener.html

moopat avatar Mar 17 '15 12:03 moopat

:v ty

kiralaw avatar Sep 25 '15 19:09 kiralaw