Add Wheel Date - Time Picker in Android Jetpack Compose.

Overview

WheelPickerCompose

Add Wheel Date - Time Picker in Android Jetpack Compose.

Usage

Picker Usage
WheelDateTimePicker { snappedDateTime -> }
WheelDatePicker { snappedDate -> }
WheelTimePicker { snappedTime -> }
WheelTextPicker(texts = (1..6).map { "Text $it" })
WheelPicker(count = 6) { index, snappedIndex ->
      Card(Modifier.size(128.dp).padding(8.dp)) {}
}

Setup

  1. Open the file settings.gradle (it looks like that)
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        // add jitpack here πŸ‘‡πŸ½
        maven { url 'https://jitpack.io' }
       ...
    }
} 
...
  1. Sync the project
  2. Add dependency
dependencies {
        implementation 'com.github.commandiron:WheelPickerCompose:1.0.10'
}

Features

WheelDateTimePicker(
    startDateTime = LocalDateTime.of(
        2025, 10, 30, 5, 0
    ),
    minYear = 1950,
    maxYear = 2050,
    disablePastDateTime = true,
    size = DpSize(200.dp, 100.dp),
    textStyle = MaterialTheme.typography.titleSmall,
    textColor = Color(0xFFffc300),
    selectorEnabled = true,
    selectorShape = RoundedCornerShape(0.dp),
    selectorColor = Color(0xFFf1faee).copy(alpha = 0.2f),
    selectorBorder = BorderStroke(2.dp, Color(0xFFf1faee))
) { snappedDateTime -> }
Comments
  • Fix AM/PM TimePicker

    Fix AM/PM TimePicker

    Was running into a bug with the DateTimePicker which prevented me changing the hour when using AM/PM mode.

    The changes I've made solve the issue but not entirely sure if they're the correct way to go about fixing it.

    opened by jackhopner 5
  • Start date setting delay

    Start date setting delay

    Delay during setting the start date when opening the date picker

    https://user-images.githubusercontent.com/17089577/197536988-f2ad8391-e73f-4f6a-bda4-0bbe9697d5cb.mp4

    bug 
    opened by n3gbx 3
  • Removed Oreo requirement for components

    Removed Oreo requirement for components

    Hi there - first and foremost, thank you for your work on this library, it's quite well done and great and it's exactly what I need for my project :)

    I noticed that since the library is using the java.time library, it's basically not possible to use for apps that don't support versions less than Oreo (even though the minSdk in the build gradle is 23 and not 26). In production and published apps, there'll be still plenty of users who will still use the old versions. So i decided to make some changes to remove this constraint and add a layer of compatibility. So the library will now use java.time APIs if Version >= 26, and Calendar if < 26.

    The library for now seems to work with the new changes, although i'm not sure if i'll have time to address further comments or requests for this PR. so i hope this code can be a starting point to extend the library :)

    Changes

    Removed constraint of needing to have Oreo to use this component (because of LocalDate/LocalDateTime etc)

    • Added CompatDate/CompatTime/CompatDateTime models which act as a layer that can handle both the new java.time API and the legacy API
    • Edited Pickers in the core folder accordingly, in order to use CompatDate
    • Created new *PickerCompat components, which the user will use in case they don't support Oreo

    Cheers

    opened by AleSpero 2
  • Hide Year if there is only one option

    Hide Year if there is only one option

    I am enjoying the WheelPicker. I would like to request the option to hide the year if there is only 1 option.

    My use case is that I would like my users to be able to select a date and time in the up coming week. Unless we are heading into the new year, most of the time, the year is obvious and does not need to be displayed.

    enhancement 
    opened by SamPlusPlus 2
  • Support for other calendars

    Support for other calendars

    Hi, i think we can support other calendar systems by adding another parameter like "dateSystem". I don't think it requires much changes. Just adding corresponding year-range, months and days range

    enhancement 
    opened by ahmad-shoja 13
  • Deprecated

    Deprecated "dev.chrisbanes.snapper:snapper" should be replaced by SnapFlingBehavior.

    From [https://github.com/chrisbanes/snapper] Snapper is now deprecated, due to it's functionality being replaced by SnapFlingBehavior which is available in Jetpack Compose 1.3.0.

    enhancement 
    opened by petros-chariskos 1
Releases(1.1.8-alpha)
Owner
Emir Demirli
Android, Kotlin.
Emir Demirli
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Igor Lashkov 318 Dec 7, 2022
A smart colored time selector. Users can select just free time with a handy colorful range selector.

Colored Time Range Selector A smart colored time range selector. Users can select just free time with a handy colorful range selector. Screen Shots Fe

Ehsan Mehranvari 154 Oct 3, 2022
WorkManager ,One time,Sequential Execution, Periodic time Execution

WokManagerSample WorkManager ,One time,Sequential Execution, Periodic time Execu

Chhote Lal Pal 0 Dec 21, 2021
AppConversorMoedas - The currency conversion using an API to bring the data up to date

LAB - Criando um app de conversor moedas/cambio com Kotlin. O curso pode ser ace

Davi Braga 0 Jan 1, 2022
πŸŽ‘ Up to date IANA timezone database library for Kotlin (JVM, JS, Native)

?? IANA Timezone Library for Kotlin Multiplatform Up to date IANA timezone database library for Kotlin (JVM, JS, Native) Usage import org.noelware.ian

Noelware 3 Jun 18, 2022
Add status to beans in Compose, Fields in beans can be directly used as the MutableState

Buff Add status to beans in Jetpack(jb) Compose, Fields in beans can be directly used as the MutableState<T> ⚠️ Non mainstream warning:This item viola

lt 2 Oct 23, 2022
Built with Jetpack compose, multi modules MVVM clean architecture, coroutines + flow, dependency injection, jetpack navigation and other jetpack components

RickAndMortyCompose - Work in progress A simple app using Jetpack compose, clean architecture, multi modules, coroutines + flows, dependency injection

Daniel Waiguru 9 Jul 13, 2022
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android

Vanilla Place Picker Vanilla Place Picker provides a UI that displays an interactive map to get the place details and Autocomplete functionality, whic

MindInventory 115 Dec 21, 2022
All in 1 picker library for android.

Lassi Lassi is simplest way to pick media (either image, video, audio or doc) Lassi Media picker Key features Simple implementation Set your own custo

MindInventory 137 Dec 30, 2022
Funstuff - Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop

PeopleInSpace Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose

Shivam Dhuria 2 Feb 15, 2022
πŸ’‘πŸš€β­οΈ A generalized adapter for RecyclerView on Android which makes it easy to add heterogeneous items to a list

Mystique is a Kotlin library for Android’s RecyclerView which allows you to create homogeneous and heterogeneous lists effortlessly using an universal

Rahul Chowdhury 48 Oct 3, 2022
Arc Layout is a view group with which you can add a arc-shaped container in your layout.

ArcLayout Arc Layout is a view group with which you can add a arc-shaped container in your layout. Two main variables are the direction and the curvat

Ali Rezaiyan 32 Aug 17, 2022
A FDPClient fork , It aims to add more modules.

LightClient A FDPClient fork , It aims to add more modules. You can download development version at Github-Actions , Release at Release Only running o

Ad973_ 3 Aug 26, 2021
A kotlin library of extension functions that add smalltalk style methods to objects.

KtTalk A kotlin library of extension functions that add smalltalk style methods to objects. Motivation Smalltalk is a pure OO language in which everyt

null 11 Oct 16, 2021
A simple e-market application that allows users to view the store details and products, add products to the basket, and place an order.

E-Market Application Features : Store details & products screen Fetch the store detail from an endpoint and display this upper part of the screen. Fet

Amit Kumar guha 2 Jun 27, 2022
Muhammad Bilal 0 Jan 6, 2022
Recycler-coroutines - RecyclerView Auto Add Data Using Coroutines

Sample RecyclerView Auto Add With Coroutine Colaborator Very open to anyone, I'l

Faisal Amir 8 Dec 1, 2022
A personal project made using Jetpack Compose, Clean-MVVM architecture and other jetpack libraries

A basic CRUD for recording your personal credit and debit transactions. Made using Jetpack Compose, Clean-MVVM and other Jetpack libraries, incorporated with Unit Tests.

Shoaib Ahmed 3 Dec 6, 2022
A fork of our clean architecture boilerplate, this time using the Android Architecture Components

Android Clean Architecture Components Boilerplate Note: This is a fork of our original Clean Architecture Boilerplate, except in this repo we have swi

Buffer 1.3k Jan 3, 2023