A Jetpack Compose library for handling calendar component rendering.

Overview

Compose Calendar

Compose Calendar is a composable handling all complexity of rendering calendar component and date selection. Due to flexibility provided by slot API's, you can decide how the calendar will look like, the library will handle proper calendar elements arrangement and it's state.

Github Actions

Setup

Library and it's snapshots are available on Maven Central repository.

" }">
  // module-level build.gradle
  dependecies {
    implementation "io.github.boguszpawlowski.composecalendar:composecalendar:
   
    "
   
  }

Supported features

  • Selection (single, multiple or a range of days)
  • Every day as first day of week
  • Showing/hiding adjacent months
  • Month and week headers
  • Customizable month container
  • Fully customizable day content
  • Horizontal swipe for changing a current month

Basic Usage

Static calendar

To show the basic version of the calendar, without any kind of selection mechanism, you can simply use the StaticCalendar composable without passing any parameters:

  @Composable
  fun MainScreen() {
    StaticCalendar()
  }

This chunk will render the calendar with default components for each day, and also month and week headers. See the StaticCalendarSample file for a full example.

By default, at first the calendar will show current month. If you want to start with some different date, you have to pass an initialMonth parameter to the initial state of the calendar. See Initial State section

Selectable calendar

Calendar with a mechanism for selection. The default implementation uses DynamicSelectionState (see Dynamic Selection section) which allows to change SelectionMode in the runtime.

  @Composable
  fun MainScreen() {
    SelectableCalendar()
  }

By the default, after changing the selection mode, selection is cleared. See the SelectableCalendarSample file for a full example

selection_demo.mp4

If you want to define your own selection behavior, please check out the Custom Selection section and/or CustomSelectionSample.

Calendar with custom components

For the customization you should pass your own composable functions as day content, moth header etc.:

  @Composable
  fun MyDay(dayState: DayState) {
    Text(dayState.date.dayOfMonth.toString())
  }

  @Composable
  fun MainScreen() {
     StaticCalendar(
        dayContent = { dayState -> MyDay(dayState) }
     )
  }

The same you can do for every customizable element:

  • Day content - responsible for single day content
  • Month header - responsible for showing the current month (and by default for changing the current month)
  • Week header - responsible for showing the names of week days.
  • Month container - wrapping the month content, it defaults to a plain Box, but can be any layout.

The Calendar composable accepts a Modifier for simple customization of the overall appearance. See the CustomComponentsSample for a full example.

Custom selection

As the selection state is represented by an interface, you can provide your own implementation, to suit your use-case. E.g:

  class MonthSelectionState(
    initialSelection: YearMonth? = null,
  ) : SelectionState {
    private var selection by mutableStateOf(initialSelection)
  
    override fun isDateSelected(date: LocalDate): Boolean =
      date.yearMonth == selection
  
    override fun onDateSelected(date: LocalDate) {
      selection = if (date.yearMonth == selection) null else date.yearMonth
    }
  }

To use the defined selection state, you have to pass it into a generic version of Calendar composable. This chunk is an implementation that will select all days in a clicked day's month. For a full example please check out CustomSelectionSample file.

Calendar properties customization

Apart from rendering your own components inside the calendar, you can modify it by passing different properties.:

  • showAdjacentMonths - whenever to render days from adjacent months. Defaults to true.
  • firstDayOfWeek - you can pass the DayOfWeek which you want you week to start with. It defaults to the first day of week of the Locale.default().
  • horizontalScrollEnabled - a Boolean flag which enables month to be changed by a horizontal swipe. Defaults to true.

Apart from this, Calendar you can pass a Modifier object like in any other composable.

State

Calendar composable holds its state as an CalendarState object, which consists of 2 properties.

  • MonthState - current value of the presented month.
  • SelectionState - current value of the selection.

Both properties are represented by interfaces, so the default implementation can be overwritten if needed. The calendar state is leveraging Compose saving mechanism, so that the state will survive any configuration change, or the process death.

Initial state

Initial state for the static calendar is provided by the rememberCalendarState() function. If you need to change the initial conditions, you can pass the params to it:

  @Composable
  fun MainScreen() {
    StaticCalendar(
      calendarState = rememberCalendarState(
        initialDate = YearMonth.now().plusYears(1),
      )
    )
  }

In case of the selectable calendar, the state has additional parameters, used to calculate the initial selection:

  @Composable
  fun MainScreen() {
    SelectableCalendar(
      calendarState = rememberSelectableCalendarState(
        initialDate = YearMonth.now().plusYears(1),
        initialSelection = listOf(LocalDate.parse("20-01-2020")),
        initialSelectionMode = SelectionMode.Period,
      )
    )
  }

State hoisting

In case you need to react to the state changes, or change the state from the outside of the composable, you need to hoist the state out of the Calendar composable:

  @Composable
  fun MainScreen() {
    val calendarState = rememberCalendarState()
    StaticCalendar(calendarState = calendarState)
   
    // now you can manipulate the state from scope of this composable
    calendarState.monthState.currentMonth = MonthYear.of(2020, 5)
  }

Dynamic Selection State

By default, the SelectableCalendar is using a DynamicSelectionState implementation of SelectionState. The selection is kept as a list of LocalDate objects. For a purpose of flexibility, DynamicSelectionState allows for 4 different selection modes, each one varying how the selection is changing after interacting with the calendar. Furthermore, selection mode can be changed in the runtime, for some specific use-cases. Selection modes are represented by SelectionMode enum, with following values:

  • None - no selection allowed - selection will always be an empty list.
  • Single - only single day is selectable - selection will contain one or zero days selected.
  • Multiple - a list of dates can be selected.
  • Period - selectable period - implemented by start and end dates. - selection will contain all dates between start and the end date.

License

Copyright 2021 Bogusz Pawłowski

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.
Comments
  • GitHub Actions 1.3.3 fails to build after updating the calendar dependency from v0.6.0 to v1.0.0

    GitHub Actions 1.3.3 fails to build after updating the calendar dependency from v0.6.0 to v1.0.0

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:checkAlphaAarMetadata'.
    > Could not resolve all files for configuration ':app:alphaRuntimeClasspath'.
       > Could not resolve io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0.
         Required by:
             project :app
          > No matching variant of io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 was found. The consumer was configured to find a runtime of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
              - Variant 'debugVariantMavenApiPublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0:
    > Task :app:checkAlphaAarMetadata FAILED
                  - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'debugVariantMavenJavaDocPublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'debugVariantMavenRuntimePublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'debugVariantMavenSourcePublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'releaseVariantMavenApiPublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0:
                  - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'releaseVariantMavenJavaDocPublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'releaseVariantMavenRuntimePublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
              - Variant 'releaseVariantMavenSourcePublication' capability io.github.boguszpawlowski.composecalendar:composecalendar:1.0.0 declares a runtime of a component:
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'alpha'
                  - Other compatible attributes:
                      - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.3.1')
                      - Doesn't say anything about its target Java environment (preferred optimized for Android)
                      - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
    
    * 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 1m 26s
    3 actionable tasks: 3 executed
    Error: Process completed with exit code 1.
    
    question 
    opened by GabrielGircenko 8
  • Allow content in `DefaultDay` to be customizable

    Allow content in `DefaultDay` to be customizable

    Context

    The current implementation for DefaultDay includes what will be inside the card in its totality. The changes you can apply from outside are limited, as they're mainly for the colors.

    Use cases/ the problem

    image Given a Calendar, what I want to do is add small icons inside the Day block.

    Current workarounds

    Currently, there is a way to do it, which is to implement my own Day. It's simple and effective.

    Improvements

    Given all the facts, there is still room for improvement.

    Suggestion 1: Extract the UI part to a different function and add it as a customizable default to DefaultDay

    Card(
        modifier = modifier
          .aspectRatio(1f)
          .padding(2.dp),
        elevation = if (state.isFromCurrentMonth) 4.dp else 0.dp,
        border = if (state.isCurrentDay) BorderStroke(1.dp, currentDayColor) else null,
        contentColor = if (isSelected) selectionColor else contentColorFor(
          backgroundColor = MaterialTheme.colors.surface
        )
      ) {
        Box(
          modifier = Modifier.clickable {
            onClick(date)
            selectionState.onDateSelected(date)
          },
          contentAlignment = Alignment.Center,
        ) {
          Text(text = date.dayOfMonth.toString())
        }
      }
    

    This guy here can go to a separate function, supported as public api:

    public fun DefaultDayContent(....) { }
    

    which can be snuck into

    @Composable
    public fun <T : SelectionState> DefaultDay(
      state: DayState<T>,
      modifier: Modifier = Modifier,
      selectionColor: Color = MaterialTheme.colors.secondary,
      currentDayColor: Color = MaterialTheme.colors.primary,
      onClick: (LocalDate) -> Unit = {},
    )
    

    Suggestion 2: Add the possibility to add icons/content below the calendar

    Take a look at this great library: https://github.com/Applandeo/Material-Calendar-View

    It contains a special customization to add icons and such to the calendar

    image

    We can support this here. BelowCalendarNumber composable/parameter seems appropriate

    enhancement Needs Refinement 
    opened by LeoColman 6
  • Update accompanist

    Update accompanist

    Hi guys thank you for a wonderful library

    but i have a problem when I use accompanist above version 0.23.1 (pager) in my project, your calendar crashes

    update accompanist please

    opened by gl00k 5
  • Add SelectionMode which doesn't allow unselecting a date

    Add SelectionMode which doesn't allow unselecting a date

    Hi! Thanks again for a great project :)

    It would be nice to have a SelectionMode where a selection is always made (so basically the Single selection date, without the ability to UNSELECT a date).

    One way to implement this now is by creating a custom day component where you simply don't react in the onClick-event if the click is on the current day, like so:

        Card(
            modifier = modifier.aspectRatio(1f).padding(2.dp),
            elevation = if (state.isFromCurrentMonth) 4.dp else 0.dp,
            border = if (state.isCurrentDay) BorderStroke(1.dp, MaterialTheme.colors.primary) else null,
            contentColor = if (isSelected) MaterialTheme.colors.secondary else contentColorFor(
                backgroundColor = MaterialTheme.colors.surface
            )
        ) {
            Box(
                modifier = Modifier.pointerInput(Unit) {
                    detectTapGestures(
                        onLongPress = {
                            onLongPress(date)
                        },
                        onTap = {
                            if(!state.selectionState.isDateSelected(date)) {
                                onClick(date)
                                selectionState.onDateSelected(date)
                            }
                        }
                    )
                },
                contentAlignment = Alignment.Center,
            ) {
                Text(
                    text = date.dayOfMonth.toString(),
                    fontWeight = textFontWeight
                )
            }
        }
    
    enhancement question 
    opened by CmdrSharp 5
  • Improve SelectionState interface

    Improve SelectionState interface

    Context

    https://github.com/boguszpawlowski/ComposeCalendar/blob/c85d5751c0e07d405e5c49b2e9e317c2efd926c4/library/src/main/java/io/github/boguszpawlowski/composecalendar/selection/SelectionState.kt#L13

    I believe this interface can be improved to accommodate more use cases. In my case, I had to implement the interface, but I don't want the selection to be changeable by the user:

    val selection = object : SelectionState {
        override fun isDateSelected(date: LocalDate): Boolean {
          return date in currentSelected.dates
        }
    
        override fun onDateSelected(date: LocalDate) {
        }
    
      }
    

    You see that I'll have to leave an empty method here, or override it to Unit?

    The problem

    The SelectionState interface isn't flexible on what you must implement

    Possible solutions

    Interface Segregation

    (On a quick note, this is one of the solid principles, the Interface Segregation Principle)

    We can extract the interface in two interfaces, but I"m not completely sure how we could adapt the rest of the code to fit this. I suppose that this is still an early project (0.x as per the documentation), it's ok to break it or add a deprecated version of the method until the 1.0.0 release.

    They're both marked as stable, so this point might not hold true :P

    // Take a look at this fun interface
    // https://kotlinlang.org/docs/fun-interfaces.html
    fun interface DateSelector : Consumer<LocalDate> {
    // Empty body, method `accept` inherited from `Consumer`
    }
    
    fun interface DateSelectionPredicate : Predicate<LocalDate> { 
    // Empty body, method `test` inherited from `Predicate`
    }
    
    interface DateSelectionHandler : DateSelector, DateSelectionPredicate {
        override fun test(t: LocalDate): Boolean {
        return false
      }
    
      override fun accept(t: LocalDate) {
      }
    }
    
    

    And then we adjust the code to ask only for what it needs from the user.

    Adding default values

    Moving the defaults from EmptySelectionState to SelectionState will allow you to override exactly what you want. The Adapter pattern will be created this way

    @Stable
    public interface SelectionState {
      public fun isDateSelected(date: LocalDate): Boolean = false
      public fun onDateSelected(date: LocalDate) = Unit
    }
    
    enhancement Needs Refinement 
    opened by LeoColman 5
  • java.lang.NoSuchMethodError: No static method rememberPagerState

    java.lang.NoSuchMethodError: No static method rememberPagerState

    In my project already use AccompanistPager v 23.1.0 And when use SelectableCalendar got the error:

    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.cexup.doctor.pusdokkes, PID: 4290
        java.lang.NoSuchMethodError: No static method rememberPagerState(IIFIZLandroidx/compose/runtime/Composer;II)Lcom/google/accompanist/pager/PagerState; in class Lcom/google/accompanist/pager/PagerStateKt; or its super classes (declaration of 'com.google.accompanist.pager.PagerStateKt' appears in /data/app/~~9dkd69JlNmf8FNSJqJyuHA==/com.cexup.doctor.pusdokkes-etFJ7cBHgDKkbgDW1WYRKQ==/base.apk!classes24.dex)
            at io.github.boguszpawlowski.composecalendar.month.MonthContentKt.MonthPager(MonthContent.kt:44)
            at io.github.boguszpawlowski.composecalendar.CalendarKt.Calendar(Calendar.kt:190)
            at io.github.boguszpawlowski.composecalendar.CalendarKt.SelectableCalendar(Calendar.kt:83)
    
    bug 
    opened by triandamai 4
  • feat: add week mode calendar

    feat: add week mode calendar

    currently this library does not support calendar for week mode, so I decided to add a small change. this is not the best solution but my team and I need this feature for our project.

    opened by triandamai 4
  • Adjust month name to respect Locale

    Adjust month name to respect Locale

    https://github.com/boguszpawlowski/ComposeCalendar/blob/afff02d8cb1c53c0ae6b89b020e0b8ed72f03a7e/library/src/main/java/io/github/boguszpawlowski/composecalendar/header/DefaultMonthHeader.kt#L47

    In line 47 of DefaultMonthHeaderwe use the enum name as the month name. This will always default to English!

    In Java 8 (used by Android and currently used by this lib) we have the method getDisplayName, which I believe is more suitable to the situation, as it will respect users' locale.

    https://docs.oracle.com/javase/8/docs/api/java/time/Month.html#getDisplayName-java.time.format.TextStyle-java.util.Locale-

    My UseCase is that my app is in Brazilian-Portuguese, and I'm unable to customize the month display name without reimplementing the DefaultMonthHeader.

    opened by LeoColman 3
  • How to track month state changes?

    How to track month state changes?

    I cannot see the callback to track the event when user changes the current month. Is there a way to do something with current month (for example I need to load events of current month and show them)?

    question 
    opened by Foenix00001 2
  • Support minSdk version 24

    Support minSdk version 24

    First of all thank you for open-sourcing such a great library.

    My application is needed to setup in Android Nougat(SDK 24) However, the library seems to be running from SDK 26 and above. It seems that the date-related classes (DayOfWeek, etc.) have SDK 26 dependency.

    Is it possible to support SDK 24 by modifying that? image

    opened by jeongth9446 2
  • Crash with Compose 1.2.0-beta02 and Accompanist 0.24.9-beta

    Crash with Compose 1.2.0-beta02 and Accompanist 0.24.9-beta

    Hello, first thank you for great calendar library for compose, it is amazing.

    Today I tried to update compose to version 1.2.0-beta02 and the application crashes, here is the log:

     java.lang.NoSuchMethodError: No static method HorizontalPager-Fsagccs(ILandroidx/compose/ui/Modifier;Lcom/google/accompanist/pager/PagerState;ZFLandroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Lcom/google/accompanist/pager/Pager; or its super classes (declaration of 'com.google.accompanist.pager.Pager' appears in /data/app/~~79VTB2fvUggsaeHt0xzbrg==/com.app.example.debug-mwfocWD7L63rBycSVz1u7w==/base.apk!classes34.dex)
            at io.github.boguszpawlowski.composecalendar.month.MonthContentKt.MonthPager(MonthContent.kt:58)
            at io.github.boguszpawlowski.composecalendar.CalendarKt.Calendar(Calendar.kt:190)
            at io.github.boguszpawlowski.composecalendar.CalendarKt.SelectableCalendar(Calendar.kt:83)
    

    Probably it is due to some changes in compose or a rather in a accompanist. Would it be possible to prepare a version for compose 1.2.0?

    Petr Štětka

    question 
    opened by petrstetka 2
  • API to provide a week overlap

    API to provide a week overlap

    First of all thank you for open-sourcing such a great library.

    I'm playing with a way to build something similar to google calendar where events can be shown for ranges of days, thinking of adding API for providing a week overlapping composable.

    Is it something you would be open to merge into this library?

    question 
    opened by YuraLaguta 4
  • Inconsistent padding/height

    Inconsistent padding/height

    Hi! Thanks for a great composable :)

    I've found that the padding seems a tad inconsistent. Below are three screenshots. The text at the bottom is positioned the same across all three, but note how the calendar has padding on some months, and none on others. From my testing, it seems that some months in each year (different for different years) get padded.

    See the screenshots, where you can notice this clearly on the month April.

    The following months have padding added in 2022

    • April
    • September
    • December

    In 2023 the following months have padding:

    • June
    • September

    And in 2024, the following:

    • August
    • November

    ..And so on. I find no good reason for this behaviour when looking through the source.

    Here's an example to reproduce:

    import androidx.compose.foundation.layout.Column
    import androidx.compose.material.Text
    import androidx.compose.runtime.Composable
    import androidx.navigation.NavController
    import io.github.boguszpawlowski.composecalendar.SelectableCalendar
    import io.github.boguszpawlowski.composecalendar.rememberSelectableCalendarState
    import java.time.DayOfWeek
    
    @Composable
    fun SplashScreen(navController: NavController) {
        val state = rememberSelectableCalendarState()
    
        Column {
            SelectableCalendar(
                calendarState = state,
                showAdjacentMonths = true,
                firstDayOfWeek = DayOfWeek.MONDAY,
            )
    
            Text(text = "Test")
        }
    }
    

    image image image

    Blocked 
    opened by CmdrSharp 6
Releases(v1.0.2)
Owner
Bogusz Pawłowski
Bogusz Pawłowski
📅 Minimal Calendar - This calendar library is built with jetpack compose. Easy, simple, and minimal.

?? Minimal Calendar This calendar library is built with jetpack compose. Easy, simple, and minimal. Latest version The stable version of the library i

Minjae Kim 16 Sep 14, 2022
Calendar - A component for compose desktop

日历 一个用于compose-desktop的日历组件。 截图 feature DayPicker的动画 月份选择器错误提示 点击非本月的时间会跳到上个月 to

wwalkingg 1 Feb 7, 2022
An android library which provides a compact calendar view much like the one used in google calenders.

CompactCalendarView CompactCalendarView is a simple calendar view which provides scrolling between months. It's based on Java's Date and Calendar clas

SundeepK 1.5k Jan 7, 2023
CustomizableCalendar is a library that allows you to create your calendar, customizing UI and behaviour

CustomizableCalendar This library allows you to create a completely customizable calendar. You can use CustomizableCalendar to create your calendar, c

MOLO17 216 Dec 6, 2022
Kmpcalendar - A calendar library and views written for kotlin multiplatform

KMPCalendarView Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compo

Anmol Verma 2 Oct 7, 2022
A better calendar for Android

Caldroid Caldroid is a fragment that display calendar with dates in a month. Caldroid can be used as embedded fragment, or as dialog fragment. User ca

Roomorama 1.4k Nov 29, 2022
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

Square 4.4k Dec 20, 2022
📅 CosmoCalendar is a fully customizable calendar with a wide variety of features and displaying modes.

CosmoCalendar Made by Applikey Solutions Usage Customization Common Selection Current day Navigation buttons Weekend days Connected days Disabled days

Applikey Solutions 1.6k Dec 22, 2022
Demo app for a horizontal schedule(event) calendar

This is a demo project that showcases a horizontally laid out calendar that shows events in a timeline fashion. It is not a library, just a reference implementation for curious developers.

Halil Ozercan 188 Dec 26, 2022
Android open source calendar

Etar Calendar Etar (from Arabic: إِيتَار) is an open source material designed calendar made for everyone! Why? Well, I wanted a simple, material desig

null 1.5k Jan 4, 2023
A simple calendar with events, customizable widgets and no ads.

Simple Calendar A simple calendar with events and a customizable widget. A simple calendar with optional CalDAV synchronization. You can easily create

Simple Mobile Tools 3k Jan 4, 2023
Solutions for Muetzilla's Advent Calendar

Solutions for Muetzilla's Advent Calendar Link To the Advents Calendar Content Solutions for Muetzilla's Advent Calendar Content Problem 1 Problem 2 P

Marc Andri Fuchs 1 Mar 23, 2022
An Android platform component management tool chain, based on Kotlin language.

Rubik Rubik是一套解决Android平台组件化的综合方案,提供gradle project之间的路由通讯能力,以及对gradle project的组件定义、版本控制、maven发布、aar/jar与源码之间的切换以及组件的自由组合等能力。 Rubik由两部分组成: Rubik Router

Baidu 135 Jan 3, 2023
A kitchen timer implemented with Jetpack Compose

Kitchen Timer Motivation and Context To commemorate Jetpack Compose first beta release, Google launched the #AndroidDevChallenge. In the 2nd round, co

Guilherme Delgado 117 Dec 23, 2022
Clock of Clocks written in Jetpack Compose framework

A Clock of Clocks made with Jetpack Compose You can download the APK Here. This project is inspired by A Clock of Clocks. Other Implementations This p

Adib Faramarzi 40 Nov 1, 2022
Asimov-flagz-kt - Feature flags library based on Togglz library

Asimov Flagz Feature flags library based on Togglz library. Installation Gradle

Nicolas Bottarini 1 Jan 8, 2022
Compose Date Picker - Select month and year

Android DatePicker with month and year build with Compose UI

Doğuş Teknoloji 47 Dec 15, 2022
GoogleCalendar Android Clone with Compose

GoogleCalendar Android Clone with Compose Status: WIP This is a jetpack compose sample app written in Kotlin following clean architecture principles.

Anmol Verma 4 Oct 8, 2022
Joda-Time library with Android specialization

Android has built-in date and time handling - why bother with a library? If you've worked with Java's Date and Calendar classes you can probably answer this question yourself, but if not, check out Joda-Time's list of benefits.

Daniel Lew 2.6k Dec 9, 2022