diff --git a/form/src/main/java/org/dhis2/form/ui/provider/inputfield/DateProvider.kt b/form/src/main/java/org/dhis2/form/ui/provider/inputfield/DateProvider.kt index 48014b1c41..5adcad2f01 100644 --- a/form/src/main/java/org/dhis2/form/ui/provider/inputfield/DateProvider.kt +++ b/form/src/main/java/org/dhis2/form/ui/provider/inputfield/DateProvider.kt @@ -53,9 +53,16 @@ fun ProvideInputDate( }, ) } - val yearIntRange = if (fieldUiModel.allowFutureDates == true) IntRange(1924, 2124) else (IntRange(1924, - Calendar.getInstance()[Calendar.YEAR] - )) + val yearIntRange = if (fieldUiModel.allowFutureDates == true) { + IntRange(1924, 2124) + } else { + ( + IntRange( + 1924, + Calendar.getInstance()[Calendar.YEAR], + ) + ) + } val selectableDates = if (fieldUiModel.allowFutureDates == true) { SelectableDates(initialDate = DEFAULT_MIN_DATE, endDate = DEFAULT_MAX_DATE) } else {