Skip to content

Commit

Permalink
fix: [ANDROAPP-6104] do not allow futures dates in age by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Jul 1, 2024
1 parent 88c26ca commit 9f95cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ private fun updateDateOfBirth(inputType: DateOfBirth, newText: TextFieldValue):
inputType
}
}

@Composable
private fun provideSupportingText(
uiModel: InputAgeModel,
Expand All @@ -330,8 +331,8 @@ private fun provideSupportingText(
!dateIsInRange(parseStringDateToMillis(it), selectableDates)
) {
val dateOutOfRangeText = "${provideStringResource("date_out_of_range")} (" +
formatStringToDate(selectableDates.initialDate) + " - " +
formatStringToDate(selectableDates.endDate) + ")"
formatStringToDate(selectableDates.initialDate) + " - " +
formatStringToDate(selectableDates.endDate) + ")"

listOf(
SupportingTextData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class InputAgeTest {
},
),

)
)
}

rule.onNodeWithTag("INPUT_AGE_TEXT_FIELD").performTextInput(futureDate)
Expand Down

0 comments on commit 9f95cce

Please sign in to comment.