Bug 1236212 - Adjust month number spinner to account for the fact that month is 0-based. r=rnewman
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 07 Jan 2016 15:58:26 -0500
changeset 279217 29b74b9db879bbbd662c38461c10fad3ad22b977
parent 279216 a54da7831cfcb3dfb2881573cb84cc058f62368b
child 279218 f2c54cd55ed5ee6baecfe6b195292ad682167f5f
push id29872
push userphilringnalda@gmail.com
push dateSat, 09 Jan 2016 19:44:56 +0000
treeherdermozilla-central@409cc770e512 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1236212
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1236212 - Adjust month number spinner to account for the fact that month is 0-based. r=rnewman
mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java
--- a/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java
+++ b/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java
@@ -349,17 +349,17 @@ public class DateTimePicker extends Fram
 
         // Initialize all spinners.
         mDaySpinner = setupSpinner(R.id.day, 1,
                                    mTempDate.get(Calendar.DAY_OF_MONTH));
         mDaySpinner.setFormatter(TWO_DIGIT_FORMATTER);
         mDaySpinnerInput = (EditText) mDaySpinner.getChildAt(1);
 
         mMonthSpinner = setupSpinner(R.id.month, 1,
-                                     mTempDate.get(Calendar.MONTH));
+                                     mTempDate.get(Calendar.MONTH) + 1); // Month is 0-based
         mMonthSpinner.setFormatter(TWO_DIGIT_FORMATTER);
         mMonthSpinner.setDisplayedValues(mShortMonths);
         mMonthSpinnerInput = (EditText) mMonthSpinner.getChildAt(1);
 
         mWeekSpinner = setupSpinner(R.id.week, 1,
                                     mTempDate.get(Calendar.WEEK_OF_YEAR));
         mWeekSpinner.setFormatter(TWO_DIGIT_FORMATTER);
         mWeekSpinnerInput = (EditText) mWeekSpinner.getChildAt(1);