aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-04-18 18:02:36 -0500
committerIván Ávalos <avalos@disroot.org>2022-04-18 18:02:36 -0500
commited7d22c35d6ddea39284a31e751a2cc9f86332f3 (patch)
tree16e4393a385717f5eee03e8068876c5cb60e6b1c /androidApp/src/main/java/mx
parent85f8a169c4add639f9e982d1c956a8d731095b99 (diff)
downloadetbsa-trackermap-mobile-ed7d22c35d6ddea39284a31e751a2cc9f86332f3.tar.gz
etbsa-trackermap-mobile-ed7d22c35d6ddea39284a31e751a2cc9f86332f3.tar.bz2
etbsa-trackermap-mobile-ed7d22c35d6ddea39284a31e751a2cc9f86332f3.zip
[android] Fixed date pickers by adding 1 to 0-based month number
Diffstat (limited to 'androidApp/src/main/java/mx')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt
index 60222ff..6cc36bd 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt
@@ -258,7 +258,7 @@ class UnitReportsFragment : Fragment() {
val (from, to) = period.getObjectDates()
fromDatePicker = DatePickerDialog(requireContext(), { p0, p1, p2, p3 ->
- fromPickedDatetime = LocalDateTime(p1, p2, p3, from.hour, from.minute)
+ fromPickedDatetime = LocalDateTime(p1, p2 + 1, p3, from.hour, from.minute)
fromTimePicker.show()
}, from.year, from.monthNumber, from.dayOfMonth)
fromDatePicker.datePicker.maxDate = Calendar.getInstance().timeInMillis
@@ -276,7 +276,7 @@ class UnitReportsFragment : Fragment() {
}, from.hour, from.minute, false)
toDatePicker = DatePickerDialog(requireContext(), { p0, p1, p2, p3 ->
- toPickedDatetime = LocalDateTime(p1, p2, p3, from.hour, from.minute)
+ toPickedDatetime = LocalDateTime(p1, p2 + 1, p3, from.hour, from.minute)
toTimePicker.show()
}, to.year, to.monthNumber, to.dayOfMonth)
toDatePicker.datePicker.maxDate = Calendar.getInstance().timeInMillis