Skip to content

Commit

Permalink
#25 feat: Datepicker 날짜 선택 불가 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungWoo-Ahn committed Apr 17, 2024
1 parent 510a7e4 commit 098ebe0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fun ConfirmGardenDialog(
}
}


@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun TutTutDatePickerDialog(
Expand All @@ -109,9 +110,10 @@ fun TutTutDatePickerDialog(
onDateSelected: (String) -> Unit,
onDismissRequest: () -> Unit
) {
val datePickerState = rememberDatePickerState(yearRange = getDatePickerYearRange()).apply {
selectedDateMillis = getDateLong(plantingDate)
}
val datePickerState = rememberDatePickerState(
yearRange = getDatePickerYearRange(),
initialSelectedDateMillis = getDateLong(plantingDate)
)
val selectedDate = datePickerState.selectedDateMillis?.let { convertMillisToDate(it) } ?: ""
if (showDialog) {
DatePickerDialog(
Expand Down

0 comments on commit 098ebe0

Please sign in to comment.