Git Product home page Git Product logo

hi-manshu / kalendar Goto Github PK

View Code? Open in Web Editor NEW
776.0 9.0 67.0 7.91 MB

Kalendar is a powerful and customizable calendar library for Android applications. It provides a flexible and intuitive way to display and interact with calendars in your app. With Kalendar, you can easily render calendar views, handle date selection, pagination, and range selection, and customize the layout to match your app's design.

Home Page: https://www.himanshoe.com

License: Apache License 2.0

Kotlin 100.00%
jetpack-compose calendar calendar-component compose kts library android android-library android-ui android-sdk

kalendar's Introduction

Kalendar - An Elementary Compose Calendar.

Kalendar Maven Central: Kalendar Github: Open Issues Kalendar Kalendar Kalendar Github Followers Twitter Follow

The Kalendar library is a powerful tool for creating calendar components in Android apps using Jetpack Compose. It provides customizable calendar views with various features and functionalities.

The Kalendar library simplifies the process of creating interactive and visually appealing calendars in Android apps. With its flexible configuration options, event integration, and interactive callbacks, you can easily build powerful calendar components that enhance the user experience.

Made with ❤️ for Android Developers by Himanshu

Kalendar supports three types of calendar:

  • Oceanic: Represents the WeekView.
  • Firey: Represents the MonthView.
  • Endlos: Represents a scrolling calendar that starts from the current month.

Getting Started

To integrate the Kalendar library into your Android app, follow these steps:

Add the Kalendar library as a dependency in your app-level build.gradle file:

implementation 'com.himanshoe:kalendar:<latest-version>'

For adding the Scrolling calendar, Endlos, add the following dependency:

implementation 'com.himanshoe:kalendar-endlos:<latest-version>'

For detailed documentation and examples on how to use the Kalendar library, please refer to the Kalendar Documentation for Oceanic/Firey and Kalendar Endlos Documentation for scrolling calendar.

Contributions, bug reports, and feature requests are welcome! Feel free to submit issues or pull requests in the Kalendar GitHub repository.

kalendar's People

Contributors

androidjunior9 avatar gsrathoreniks avatar hi-manshu avatar renovate[bot] avatar sudhir-kanani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kalendar's Issues

How to change only the color of Text on a special day (Sunday)

I am developing Android layout using jetpack compose and kotlin. I'm developing a calendar view using the Kalendar library, and I'd like to color in Text only on certain days of the week, Sunday, and all other dates in black. I implemented the code as I wanted, but when I modified the code and ran the app, Kalendar's Text was all black, and I had a problem that when I clicked on a Sunday date, all the Text colors on the calendar turned red. How do I modify the code as I want?

This is code on My Project of Part:

                   val selectedDate = LocalDate.of(
                            year.toInt(), month.toInt(), day.toInt()
                        )
                        val dayOfWeek = selectedDate.dayOfWeek

                   val dayColor: Color = when (dayOfWeek.value) {
                                   6 -> Color.Blue
                                   7 -> Color(0xFFF86B6B)
                                   else -> Color.Black }

                   Kalendar(
                    currentDay = null,
                    kalendarType = KalendarType.Firey,
                    kalendarHeaderTextKonfig = KalendarTextKonfig(
                        kalendarTextColor = Color.Black, kalendarTextSize = 22.sp
                    ),
                    kalendarColors = KalendarColors(color = List(12) {
                        KalendarColor(
                            backgroundColor = Color.White,
                            dayBackgroundColor = Color(0xFFFFDAB9),
                            headerTextColor = Color.Black
                        )
                    }),
                    kalendarDayKonfig = KalendarDayKonfig(
                        size = 56.dp,
                        textSize = 14.sp,
                        textColor = dayColor,
                        selectedTextColor = dayColor,
                        borderColor = Color.Transparent
                    ),
                    daySelectionMode = DaySelectionMode.Single,
                    onDayClick = { localDate: kotlinx.datetime.LocalDate, kalendarEvents: List<KalendarEvent> ->
                        year = localDate.year.toString()
                        month = localDate.monthNumber.toString()
                        day = localDate.dayOfMonth.toString()

                        val selectedDate = LocalDate.of(
                            localDate.year, localDate.monthNumber, localDate.dayOfMonth
                        )
                        val dayOfWeek = selectedDate.dayOfWeek

                        dayString = when (dayOfWeek.value) {
                            1 -> "월요일"
                            2 -> "화요일"
                            3 -> "수요일"
                            4 -> "목요일"
                            5 -> "금요일"
                            6 -> "토요일"
                            7 -> "일요일"
                            else -> ""
                        }
                        scope.launch {
                            readTodo(token, year, month, day) {
                                todoList.clear()
                                for (i in it!!.data) {
                                    todoList.add(i)
                                }
                            }
                        }
                    },
                    headerContent = { month, year ->
                        Row(
                            modifier = Modifier.padding(start = 20.dp, bottom = 16.dp),
                            verticalAlignment = Alignment.CenterVertically,
                            horizontalArrangement = Arrangement.Start
                        ) {
                            Image(
                                modifier = Modifier.size(22.dp), painter = painterResource(
                                    id = R.drawable.headertextemogi
                                ), contentDescription = null
                            )

                            Spacer(modifier = Modifier.width(4.dp))

                            Text(
                                text = if (month.number.toString().length < 2) {
                                    "${year}. 0${month.number}"
                                } else {
                                    "${year}. ${month.number}"
                                },
                                fontSize = 22.sp,
                                lineHeight = 28.6.sp,
                                fontWeight = FontWeight(700),
                                color = Color(0xFF000000)
                            )
                        }
                    },
                    showLabel = true
                )

untitled

Show Circle Marker Or Different Shape If Date Have An Event

Is your feature request related to a problem? Please describe.
When adding a new event Calendar just enable us to change text color.
But sometime we need a sweet virtualization.

If it is possible a nice circle on the bottom date string would be better.

dayBackgroundColor size modify

The latest version of the kalendar library you are currently offering can specify dayBackgroundColor, but you cannot modify the size of the dayBackgroundColor. The circle size provided by the library should be used, so it would be nice if the user could adjust the size arbitrarily so that the user could design the circle size so that the design could be applied accordingly.

How to change the month of calendar

If I click on the text with the text "<" and ">", I'm implementing the code to move on to the previous month and the next month.
In addition, if I click text "<" and ">", I'm trying to implement an automatic change in the days that matches the changed month as well as the previous month and the next month.
But I'm asking because it doesn't work out well. How can I modify the code?

var selectedTodo by remember { mutableStateOf<RToDoResponse?>(null) }

    val selectedDate = LocalDate.of(
        year.toInt(), month.toInt(), day.toInt()
    )

    var previousSelectedDate by remember { mutableStateOf(selectedDate) }

    val today = Clock.System.todayIn(currentSystemDefault())
    val displayedMonth = remember { mutableStateOf(today.month) }
    val displayedYear = remember { mutableStateOf(today.year) }
    val currentMonth = displayedMonth.value
    val currentYear = displayedYear.value
    val currentMonthIndex = currentMonth.value.minus(1)

                    Kalendar(
                        currentDay = null,
                        kalendarType = KalendarType.Firey,
                        kalendarHeaderTextKonfig = KalendarTextKonfig(
                            kalendarTextColor = Color.Black, kalendarTextSize = 22.sp
                        ),
                        kalendarColors = KalendarColors(color = List(12) {
                            KalendarColor(
                                backgroundColor = Color.White,
                                dayBackgroundColor = Color(0xFFFFDAB9),
                                headerTextColor = Color.Black
                            )
                        }),
                        daySelectionMode = DaySelectionMode.Single,
                        headerContent = { month, year ->
                            Row(
                                modifier = Modifier.padding(
                                    start = 20.dp,
                                    end = 20.dp,
                                    bottom = 16.dp
                                ),
                                verticalAlignment = Alignment.CenterVertically,
                                horizontalArrangement = Arrangement.Start
                            ) {
                                Image(
                                    modifier = Modifier.size(22.dp), painter = painterResource(
                                        id = R.drawable.headertextemogi
                                    ), contentDescription = null
                                )

                                Spacer(modifier = Modifier.width(4.dp))

                                Text(
                                    text = if (currentMonth.value.toString().length < 2) {
                                        "${currentYear}. 0${currentMonth.value}"
                                    } else {
                                        "${currentYear}. ${currentMonth.value}"
                                    },
                                    fontSize = 22.sp,
                                    lineHeight = 28.6.sp,
                                    fontWeight = FontWeight(700),
                                    color = Color(0xFF000000)
                                )

                                Spacer(modifier = Modifier.weight(1f))

                                Text(
                                    modifier = Modifier.clickable {
                                        displayedYear.value -= if (currentMonth == Month.JANUARY) 1 else 0
                                        displayedMonth.value -= 1
                                    },
                                    text = "<",
                                    fontSize = 22.sp,
                                    lineHeight = 28.6.sp,
                                    fontWeight = FontWeight(700),
                                    color = Color(0xFF000000)
                                )

                                Spacer(modifier = Modifier.padding(horizontal = 8.dp))

                                Text(
                                    modifier = Modifier.clickable {
                                        displayedYear.value -= if (currentMonth == Month.JANUARY) 1 else 0
                                        displayedMonth.value -= 1
                                    },
                                    text = ">",
                                    fontSize = 22.sp,
                                    lineHeight = 28.6.sp,
                                    fontWeight = FontWeight(700),
                                    color = Color(0xFF000000)
                                )
                            }
                        },
                        showLabel = true,
                        dayContent = { date: kotlinx.datetime.LocalDate ->
                            val dayOfWeek = calculateDay(
                                date.dayOfMonth,
                                displayedMonth.value,
                                displayedYear.value
                            ).dayOfWeek
                            Box(
                                modifier = Modifier
                                    .padding(10.dp)
                                    .size(36.dp)
                                    .background(
                                        color = if (selectedDate == date.toJavaLocalDate()) {
                                            Color(0xFFFFDAB9)
                                        } else if (previousSelectedDate == date.toJavaLocalDate()) {
                                            Color(0xffE9E9E9)
                                        } else {
                                            Color.White
                                        },
                                        CircleShape
                                    )
                                    .pointerInput(Unit) {
                                        detectTapGestures(onPress = {
                            }
                        }
                    )

@RequiresApi(Build.VERSION_CODES.O)
private fun calculateDay(
    day: Int,
    currentMonth: Month,
    currentYear: Int
): kotlinx.datetime.LocalDate {
    val monthValue = currentMonth.value.toString().padStart(2, '0')
    val dayValue = day.toString().padStart(2, '0')
    return "$currentYear-$monthValue-$dayValue".toLocalDate()
}

@RequiresApi(Build.VERSION_CODES.O)
private fun getFirstDayOfMonth(firstDayOfMonth: DayOfWeek) = -(firstDayOfMonth.value).minus(2)

Option to start the week on Mondays on Oceanic

Hi, first of all amazing project!

I was tweaking yesterday in a fork I've made of the project and I managed to do exactly what the title says as I cannot see the option to change it on the main branch. I've seen an old issue when this was supposedly solved but I'm not seeing that KalendarKonfig class anymore.

Another aspect I added but haven't test it is the option to change the styling of the BorderStroke for the current day, as it was a bit weird with the default black on a dark background.

Thanks so much, you can take a look on my fork KalendarLocale if you want. Ignore the commits where I try to upload it to Jitpack without success, as I was trying to use this component with the changes for a different project.

Highlight current date

Is your feature request related to a problem? Please describe.
Is there a possibility to highlight the current day and a selected day?

Describe the solution you'd like
I would wish if you could highlight the current day and selected day differently.

Error "java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/animation/AnimatedContentScope;"

Kalendar(
currentDay = today,
kalendarType = KalendarType.Firey,
modifier = Modifier,
showLabel = true,
events = KalendarEvents(),
kalendarHeaderTextKonfig = null,
kalendarColors = KalendarColors.default(),
kalendarDayKonfig = KalendarDayKonfig.default(),
daySelectionMode = DaySelectionMode.Single,
dayContent = null,
headerContent = null,
onDayClick = { selectedDay, events ->
// Handle day click event
},
onRangeSelected = { selectedRange, events ->
// Handle range selection event
},
onErrorRangeSelected = { error ->
// Handle error
})

date range selection

Is your feature request related to a problem? Please describe.
as a user I would like to select day from- to and see all days in blue color, to select trip date range
image

Kalendar no static method AnimatedContent

Basically when trying to create a kalendar this error PopUps

java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
                                                                                                    	at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
                                                                                                    	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
                                                                                                    	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
                                                                                                    	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)

I just did this: Kalendar(currentDay = LocalDate(1,1,1), kalendarType = KalendarType.Oceanic)

Full error log


java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~xNgNX39TlWzj5MoSWit4Nw==/com.full.crm-p5K3zqTJAzqqk07GPKpHKA==/base.apk)
                                                                                                   	at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
                                                                                                   	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)
                                                                                                   	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:118)
                                                                                                   	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:63)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:59)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:56)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:132)
                                                                                                   	at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:114)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.SurfaceKt.Surface-T9BRK9s(Surface.kt:111)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:53)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-2$1.invoke(MainActivity.kt:52)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:360)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:73)
                                                                                                   	at com.full.crm.ui.theme.ThemeKt.CRMTheme(Theme.kt:65)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:52)
                                                                                                   	at com.full.crm.ComposableSingletons$MainActivityKt$lambda-3$1.invoke(MainActivity.kt:51)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
                                                                                                   	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
                                                                                                   	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:195)
2023-11-01 15:44:29.303 14534-14534 AndroidRuntime          com.full.crm                         E  	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
                                                                                                   	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:158)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:157)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:157)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:142)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
                                                                                                   	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                   	at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
                                                                                                   	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3340)
                                                                                                   	at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3273)
                                                                                                   	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:588)
                                                                                                   	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1013)
                                                                                                   	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:183)
                                                                                                   	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
                                                                                                   	at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
                                                                                                   	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
                                                                                                   	at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1266)
                                                                                                   	at android.view.View.dispatchAttachedToWindow(View.java:21980)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
                                                                                                   	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3014)
                                                                                                   	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
                                                                                                   	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
                                                                                                   	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
                                                                                                   	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
                                                                                                   	at android.view.Choreographer.doCallbacks(Choreographer.java:952)
                                                                                                   	at android.view.Choreographer.doFrame(Choreographer.java:882)
2023-11-01 15:44:29.304 14534-14534 AndroidRuntime          com.full.crm                         E  	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
                                                                                                   	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                   	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                   	at android.os.Looper.loopOnce(Looper.java:205)
                                                                                                   	at android.os.Looper.loop(Looper.java:294)
                                                                                                   	at android.app.ActivityThread.main(ActivityThread.java:8177)
                                                                                                   	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                   	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
                                                                                                   	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Events dots visible for all dates.

Describe the bug
Even if the event is set for a specific date, it's showing events on all the dates throughout the calendar,

To Reproduce
Steps to reproduce the behavior:

  1. Add events
  2. See the preview in device

Improve Configuration

  • Improve configuration to edit composable right from colors to size
  • Make the Composable more configurable

Multiple Events to be returned on day click

Is your feature request related to a problem? Please describe.
When a day is clicked, and an event is returned, if there are multiple events, we only get the first event on that day.

Describe the solution you'd like
Returns a list of all events on that day

Create apk in github assets

It would be very good to add apk in github action assets on each release, so developers can get a hands on experience on library, without implementing on their project or importing this project

Release workflow is not triggered

Describe the bug
After creating the release release.yml workflow should be triggered, but not triggered, because of that readme apk download link showing 404 error.

onCurrentDayClick return mutliple events

This request was resolved for the Kalendar-enloss composable, but would like to have the main Kalendar composable return multiple KalendarEvents

See issue #31 for the resolution

Scrolling is not smooth

Describe the bug
Try scrolling through the months and it's not smooth.

To Reproduce
Steps to reproduce the behavior:
Just scroll through the months and we can see the lag.

Expected behavior
Can we make scrolling smooth to improve the user experience?

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Listener for previous and next month

Hi there Kalendar Team!!
First of all I wanna say Congrats and thanks for this incredible library.

I Implemented it on my personal project and it works great. However there is a feature that I'd like you to add. I'm talking about the onPreviousClick and onNextClick on KalendarHeader. I'd like to know when user clicks on those options. You could return a lambda to let us to handle the logic.

Thanks in advance guys!

Date range picker would be a nice add.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Incorrect Month Progression.

image

I think I may be doing something wrong, because for some reason, when I am using the Endlos version of the calendar, I only get the remaining months of the current year, for all years. As you can see from the screenshot, after December, the next year begins from August.

Also, if the week does not have dates in the current month, there looks to be some kind of a padding/margin issue I haven't been able to fix. Any pointers would be appreciated.

Include an event mark on days

Hi, first of all thank you very much for developing a calendar in Compose as there is no calendar component as with XML.

On the other hand, from what I have seen it doesn't seem to me that you have that included but I comment it to you in case you are planning to develop it or in case it is there and I haven't noticed it.

The idea is that when you pass a series of lists with dates (month and day) in the calendar it appears marked with a dot or in some way as that day there is an event or something, then if you click on that day it shows what the developer wants (which as such if I have seen that you have put that if you click on a day it shows what the developer wants).

I don't know what you think, tell me whatever it is, and of course, thank you very much

Min and max date

This is a great library but it could be even better if :

  1. Add minimum and maximum selectable date
  2. Change from collapsed calendar to expanded (full month) when scrolling down from the bottom of it

Crash

Describe the bug
Crash when using inside bottom navigation tab with appBar

 FATAL EXCEPTION: main
                                                                                                    Process: com.poovarasan.nakkaq, PID: 20287
                                                                                                    java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/data/com.poovarasan.nakkaq/code_cache/.overlay/base.apk/classes.dex)
                                                                                                    	at com.himanshoe.kalendar.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:55)
                                                                                                    	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:64)
                                                                                                    	at com.himanshoe.kalendar.KalendarKt.Kalendar(Kalendar.kt:32)
                                                                                                    	at com.poovarasan.nakkaq.pages.ComposableSingletons$CalendarTabKt$lambda-2$1.invoke(CalendarTab.kt:61)
                                                                                                    	at com.poovarasan.nakkaq.pages.ComposableSingletons$CalendarTabKt$lambda-2$1.invoke(CalendarTab.kt:59)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                                                                                                    	at com.poovarasan.nakkaq.components.ScaffoldAppBarKt$ScaffoldAppBar$2.invoke(ScaffoldAppBar.kt:20)
                                                                                                    	at com.poovarasan.nakkaq.components.ScaffoldAppBarKt$ScaffoldAppBar$2.invoke(ScaffoldAppBar.kt:16)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                                                                                                    	at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:322)
                                                                                                    	at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:320)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:771)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:439)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
                                                                                                    	at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
                                                                                                    	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3330)
                                                                                                    	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3320)
                                                                                                    	at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
                                                                                                    	at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
                                                                                                    	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3320)
                                                                                                    	at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3255)
                                                                                                    	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:587)
                                                                                                    	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:966)
                                                                                                    	at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3938)
                                                                                                    	at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3938)
                                                                                                    	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:459)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:432)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:423)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:412)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:733)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Provide previous/next month callbacks

Hi, nice job with this library!

Now that you provide the possibility to fully customize calendar header, I think you should provide a default method to go to previous/next month, because at the moment you can customize the appearance of the header but if you do so you completely lose the possibility of navigating through different months.

Background color change

It is a great library and thank you for helping me a lot.
It would be great if there was a function to change the background color when configuring the screen.

Kalendar Firey: Year doesn't change

Describe the bug
The year always stays the same.

To Reproduce

  1. Create a basic Kalendar Firey instance: Kalendar(kalendarType = KalendarType.Firey)
  2. Click on the "next month" button until you cross a year boundary (e.g. "December" > "January")
  3. The year stays the same and the calendar just loops the initial year

Expected behavior
The year should increase/decrease when crossing year boundaries.

Allow customization of initial day of week

In Germany, Spain and I guess many other European countries, the week starts with Monday, not Sunday.

In any case, it would be great to have an option to have this done automatically/manually set locale/manually set the first weekday.

Build completed with 7 failures when upgrading to RC1

Problems compiling after updating the library to version 1.0.0-RC1, here is what I have included in the Gradle and the log that I get back after giving a Build Failed

I have updated the dependency within Gradle (app) to the following version
implementation("com.himanshoe:kalendar:1.0.0-RC1")

Within the Gradle (Project) I have added
mavenCentral()

FAILURE: Build completed with 7 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

7: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find sample-app:design-core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://repo.maven.apache.org/maven2/sample-app/design-core/unspecified/design-core-unspecified.pom
       - https://jitpack.io/sample-app/design-core/unspecified/design-core-unspecified.pom
     Required by:
         project :app > com.himanshoe:kalendar:1.0.0-RC1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 464ms

Questions about Kalendar's functionality

I have a question while writing the library.

  1. Can't I match Kalendar's Header vertically with the Monday line?
  2. If Kalendar appears on the screen when I run the app, can't I automatically load the data if I set the data on the current date?

Showing the week value(mon~sun) is different of two view

Two month-week calendars are implemented using the type KalendarType.Oceanic and KalendarType.Firey. Oceanic type shows the value of week in English, while Firey type shows the value of week in Korean.
Is there a method or property that integrates these two environments into one language?

i1
i2

Add the possibility to choose the language of the calendar.

Thanks for this library ! it's very useful, I'm using it in one of my applications, it works well but the problem is that the language of days and months is only English.

It would be great if we could choose the language for example in the constructor of kalendarConfig.

I tried to implement this feature and it works if possible I can open a PR.

Thanks !

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency androidx.appcompat:appcompat to v1.7.0
  • Update dependency androidx.core:core-ktx to v1.13.1
  • Update dependency androidx.lifecycle:lifecycle-runtime-ktx to v2.8.2
  • Update dependency androidx.lifecycle:lifecycle-viewmodel-compose to v2.8.2
  • Update dependency androidx.test.espresso:espresso-core to v3.6.1
  • Update dependency androidx.test.ext:junit to v1.2.1
  • Update dependency com.google.android.material:material to v1.12.0
  • Update dependency com.slack.lint.compose:compose-lint-checks to v1.3.1
  • Update dependency gradle to v8.8
  • Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.0
  • Update actions/checkout action to v4
  • Update actions/setup-java action to v4
  • Update actions/upload-artifact action to v4
  • Update dependency androidx.compose:compose-bom to v2024
  • Update dependency androidx.paging:paging-compose to v3
  • Update plugin org.jetbrains.kotlin.android to v2
  • 🔐 Create all rate-limited PRs at once 🔐

Warning

Renovate failed to look up the following dependencies: Failed to look up maven package org.jlleitschuh.gradle:ktlint-gradle.

Files affected: build.gradle


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/run-detekt.yml
  • actions/checkout v3
  • actions/setup-java v3
  • actions/upload-artifact v3
.github/workflows/run-dokka.yml
  • actions/checkout v3
  • actions/setup-java v3
  • gradle/gradle-build-action v2
  • JamesIves/github-pages-deploy-action v4.4.2
gradle
gradle.properties
settings.gradle
build.gradle
  • io.gitlab.arturbosch.detekt:detekt-gradle-plugin 1.23.0
  • org.jlleitschuh.gradle:ktlint-gradle 11.3.2
  • com.android.application 8.0.2
  • com.android.library 8.0.2
  • org.jetbrains.kotlin.android 1.8.21
  • org.jetbrains.dokka 1.8.10
app/build.gradle
  • composeOptions 1.4.7
  • org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
  • androidx.core:core-ktx 1.8.0
  • androidx.lifecycle:lifecycle-runtime-ktx 2.3.1
  • androidx.activity:activity-compose 1.5.1
  • androidx.compose:compose-bom 2023.05.01
  • junit:junit 4.13.2
  • androidx.test.ext:junit 1.1.3
  • androidx.test.espresso:espresso-core 3.4.0
  • androidx.compose:compose-bom 2023.05.01
kalendar/gradle.properties
kalendar/build.gradle
  • com.vanniktech.maven.publish 0.25.2
  • composeOptions 1.4.7
  • androidx.core:core-ktx 1.10.1
  • androidx.appcompat:appcompat 1.6.1
  • com.google.android.material:material 1.9.0
  • androidx.compose:compose-bom 2023.05.01
  • org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
  • com.slack.lint.compose:compose-lint-checks 1.2.0
  • junit:junit 4.13.2
  • androidx.test.ext:junit 1.1.3
  • androidx.test.espresso:espresso-core 3.4.0
kalendar-endlos/gradle.properties
kalendar-endlos/build.gradle
  • com.vanniktech.maven.publish 0.25.2
  • composeOptions 1.4.7
  • androidx.compose:compose-bom 2023.05.01
  • androidx.lifecycle:lifecycle-viewmodel-compose 2.6.1
  • org.jetbrains.kotlinx:kotlinx-datetime 0.4.0
  • com.slack.lint.compose:compose-lint-checks 1.2.0
  • androidx.paging:paging-compose 1.0.0-alpha20
  • androidx.core:core-ktx 1.10.1
  • androidx.appcompat:appcompat 1.6.1
  • com.google.android.material:material 1.9.0
  • junit:junit 4.13.2
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.1
quality/static-check.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.0

  • Check this box to trigger a request for Renovate to run again on this repository

Support swiping to change dates

As a user, I would find it really convenient if I could swipe either left/right on the calendar to change the selected date.

Oceanic View - add day of week above date

Currently the Oceanic view shows the week view of the Kalendar. There is no indication of what day of the week it is like in the Fiery view ( M T W T F S S )

Perhaps as an option? Show/Hide the Day of the week letters above the date? Example
M T W T F S S
1 2 3 4 5 6 7

Allow default configs to be copied and reused easily

All the default configurations are marked as internal. These could be made public so that the defaults can be copied and reused whilst replacing only the properties that need to be replaced. Similar to what the official compose APIs provide. Take ButtonDefaults for instance.

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:tv/tv-material/src/main/java/androidx/tv/material3/ButtonDefaults.kt;l=101?q=ButtonDefaults

Currently, to change the textSize of the day, you are forced to also provide size, textSize and textColor instead of being able to just do something like KalendarDayKonfig.default(textSize = 90.sp) or KalendarDayKonfig.default().copy(textSize = 90.sp)

KalendarDay's textSize, text style and Shape are not customizable

Is your feature request related to a problem? Please describe.
Hello, I am testing this library and I saw that a few things have a default value that can't be customizable.

For example, in the KalendarDay composable, the textSize cannot be overridden because the KalendarFirey comp that uses KalendarDay do not pass a value to the textSize parameter.
The shape is also not customizable and is set to CircleShape.
The text style isn't customizable as well.

Describe the solution you'd like
A way to pass the textSize, the text style and the shape in the KalendarDay.

Why kotlinx time

Is there a reason why you use kotlinx time and not java time for a compose project? Now you need another dependency to map the whole thing back to java.time. 🤔

Oceanic dates size static

The dates size aren't dynamic. Even in your gifs, the screen size is not big enough to accommodate all 7 days and it cuts off the extra ones. It would be better if the size dynamically changed to fit the screen

java.lang.NoSuchMethodError: No static method - AnimatedContent

java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~ld90tcC92DCwdfLxq_5ZEg==/com.coachpass.h2oTeam-pl-p1A2QOnPKYKUPzRpTpw==/base.apk)
                                                                                                    	at com.himanshoe.kalendar.ui.component.header.KalendarHeaderKt.KalendarHeader(KalendarHeader.kt:87)
                                                                                                    	at com.himanshoe.kalendar.ui.oceanic.KalendarOceanicKt.KalendarOceanic(KalendarOceanic.kt:120)

Hi, I am using Compose 1.5.1 and I am getting this error for KalendarOceanic.

I love this library. amazing!

From what version of Android does this library support?

I am using this library to develop a todolist app. In the case of the latest version of Android devices, kalendar can be seen well, but in the case of the old version of Android devices, kalendar looks strange.

Line 1 of the table shows the screen when the cell phone is an old device(Samsung Galaxy S9), and line 2 shows the screen when the cell phone is a bit of a recent device(Samsung Galaxy A30).

month-kalendar week-kalendar
image image
image image

question

I wonder that whether use scrolling to change seven days instead of button is better?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.