Skip to content

Commit

Permalink
Fix datepicker empty row (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhirkevich authored Dec 6, 2023
1 parent 9e63b1f commit f9d8a45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ internal actual object PlatformDateFormat {
val nsDate = NSDate.dateWithTimeIntervalSince1970(utcTimeMillis / 1000.0)

return NSDateFormatter().apply {
setTimeZone(TimeZone.UTC.toNSTimeZone())
setLocale(locale)
setDateFormat(pattern)
}.stringFromDate(nsDate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ internal class KotlinxDatetimeCalendarModel : CalendarModel {
}

private fun LocalDate.daysFromStartOfWeekToFirstOfMonth() =
(dayOfWeek.isoDayNumber - firstDayOfWeek).let { if (it > 0) it else 7 + it }
(dayOfWeek.isoDayNumber - firstDayOfWeek).let { if (it >= 0) it else 7 + it }
}

internal fun Instant.toCalendarDate(
Expand Down

0 comments on commit f9d8a45

Please sign in to comment.