aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-04-13 19:14:27 -0500
committerIván Ávalos <avalos@disroot.org>2022-04-13 19:14:27 -0500
commit74bb32cba48a5278add7fb0ed555914633a613d3 (patch)
tree45fd6d3ba8e2579c7790f10de04cbe2862994c76 /androidApp/src/main/java/mx/trackermap/TrackerMap/android/details
parent10cb1152a2cb76609e6f65a0e7a2690013d3de16 (diff)
downloadetbsa-trackermap-mobile-74bb32cba48a5278add7fb0ed555914633a613d3.tar.gz
etbsa-trackermap-mobile-74bb32cba48a5278add7fb0ed555914633a613d3.tar.bz2
etbsa-trackermap-mobile-74bb32cba48a5278add7fb0ed555914633a613d3.zip
- [android] Set maxDate in date pickers for custom reports
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/details')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt3
1 files changed, 3 insertions, 0 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 03a4220..21fc62e 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
@@ -261,6 +261,7 @@ class UnitReportsFragment : Fragment() {
fromPickedDatetime = LocalDateTime(p1, p2, p3, from.hour, from.minute)
fromTimePicker.show()
}, from.year, from.monthNumber, from.dayOfMonth)
+ fromDatePicker.datePicker.maxDate = Calendar.getInstance().timeInMillis
fromTimePicker = TimePickerDialog(requireContext(), { p0, p1, p2 ->
fromPickedDatetime = LocalDateTime(
@@ -278,6 +279,7 @@ class UnitReportsFragment : Fragment() {
toPickedDatetime = LocalDateTime(p1, p2, p3, from.hour, from.minute)
toTimePicker.show()
}, to.year, to.monthNumber, to.dayOfMonth)
+ toDatePicker.datePicker.maxDate = Calendar.getInstance().timeInMillis
toTimePicker = TimePickerDialog(requireContext(), { p0, p1, p2 ->
toPickedDatetime = LocalDateTime(
@@ -290,6 +292,7 @@ class UnitReportsFragment : Fragment() {
unitReportsViewModel.setReportPeriod(it.withFrom(fromPickedDatetime))
}
}, to.hour, to.minute, false)
+
}
unitReportsViewModel.geofences.observe(viewLifecycleOwner) { geofences ->