A multi-selectable calendar for jetpack compose. It always selection of multiple dates on calendar and is flexible dependent on ones usecase
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
for Kotlin DSL
repositories {
...
maven { url = uri("https://www.jitpack.io" ) }
}
dependencies {
implementation("com.github.Felix-Kariuki.MultiSelectCalendar:multiSelectCalendar:v0.1.2")
}
In your composable where you intend to use
val multiSelectState = rememberMultiSelectCalendarState()
allows you to control any prior dates you would like to mark as selected if need be
val multiSelectState = rememberMultiSelectCalendarState(
initialSelectedDates = emptyList() //initial selected dates
)
MultiSelectCalendar(
calendarState = multiSelectState
)
To get the list of selected dates
val dates = multiSelectState.selectedState.selected
sample.mp4
Being in a situation where I had to select multple random dates I found it necessary to create a library that is more suited to my usecase and more customizable There are multiple scenarios it can be used eg,
- selecting multiple random dates(not range)
- Blocking multiple dates while selecting others
Felix Kariuki
Do Reach Out :
Copyright 2023 Felix Kariuki
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.