From a3072775a14d70ba52f8af6162fe81ca9021eafb Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Sat, 27 Jul 2024 11:03:50 +0200 Subject: [PATCH] Update compose docs --- docs/Compose.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Compose.md b/docs/Compose.md index f740684c..e4955195 100644 --- a/docs/Compose.md +++ b/docs/Compose.md @@ -635,13 +635,13 @@ A year calendar implementation from the sample app: The year calendar composables also provide a parameter `isMonthVisible` which determines if a month is added to the calendar year grid. For example, if you want a calendar that starts in the year 2024 -and ends in the year 2054, but only shows months from from July 2024, the logic would look like +and ends in the year 2054, but only shows months from October 2024, the logic would look like this: ```kotlin @Composable fun MainScreen() { - val july2024 = remember { YearMonth.of(2024, Month.JULY) } + val october2024 = remember { YearMonth.of(2024, Month.OCTOBER) } val startYear = remember { Year.of(2024) } val endYear = remember { Year.of(2054) } val firstDayOfWeek = remember { firstDayOfWeekFromLocale() } @@ -657,8 +657,8 @@ fun MainScreen() { dayContent = { Day(it) }, yearHeader = { YearHeader(it) }, monthHeader = { MonthHeader(it) }, - isMonthVisible = { month -> - month.yearMonth >= july2024 + isMonthVisible = { data -> + data.yearMonth >= october2024 } ) }