Skip to content

Commit

Permalink
[FIX/#296] DateTimeException 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
boiledEgg-s committed Oct 23, 2024
1 parent 14af30d commit e5c3ecc
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ private fun CalendarScreen(
snapshotFlow { pagerState.currentPage }
.collect { current ->
val date = getLocalDateByPage(current)
val newDate = LocalDate.of(date.year, date.month, uiState.selectedDate.dayOfMonth)

val newDate = LocalDate.of(
date.year,
date.month,
uiState.selectedDate.dayOfMonth.coerceAtMost(date.month.minLength())
)
updateSelectedDate(newDate)
}
}
Expand Down

0 comments on commit e5c3ecc

Please sign in to comment.