This calendar library is built with jetpack compose. Easy, simple, and minimal.
The stable version of the library uses Compose 1.2.x version.
| Compose | Library |
|---|---|
| 1.2.x |
π Step.1 Java 8+ API desugaring support (Android Gradle Plugin 4.0.0+).
Include the following in your app moduleβs build.gradle(app) file:
android {
....
compileOptions {
coreLibraryDesugaringEnabled true
}
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:<latest-version>'
}See here for the
<latest-version>
π Step.2 Add it in your setting.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
....
maven { url "https://jitpack.io" }
}
}π Step.3 Add the dependency your build.gradle(app):
dependencies {
implementation 'com.github.memeze:minimal-calendar:<latest-version>'
}See here for the
<latest-version>
fun MinimalCalendar(
modifier: Modifier = Modifier,
initDate: LocalDate = LocalDate.now(),
onSelectDate: (date: LocalDate) -> Unit,
calendarColors: MinimalCalendarColors = MinimalCalendarTheme.colors(),
calendarConfig: MinimalCalendarConfig = MinimalCalendarConfig()
)data class MinimalCalendarColors(
val defaultColor: Color,
val backgroundColor: Color,
val headerBackgroundColor: Color,
val headerDateTextColor: Color,
val headerTodayIconColor: Color,
val headerArrowIconColor: Color,
val headerSelectIconColor: Color,
val selectionBackgroundColor: Color,
val selectionItemTextColor: Color,
val selectionItemSelectedBackgroundColor: Color,
val selectionItemSelectedTextColor: Color,
val selectionButtonBackgroundColor: Color,
val selectionButtonTextColor: Color,
val weekBackgroundColor: Color,
val weekTextColor: Color,
val dateTextColor: Color,
val dateTodayBackgroundColor: Color,
val dateTodayTextColor: Color,
val dateSelectedBackgroundColor: Color,
val dateSelectedTextColor: Color
)data class MinimalCalendarConfig(
val yearRange: IntRange = IntRange(1900, 2100),
val locale: Locale = Locale.getDefault()
) Copyright 2022 memeze
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


