An open API service indexing awesome lists of open source software.

https://github.com/williamgates99/jalalidatepicker

Jalali Date Picker is a highly customizable and user-friendly date picker component designed for Android Jetpack Compose.
https://github.com/williamgates99/jalalidatepicker

android compose date dependency jalali jetpack jetpack-compose kotlin library persian picker shamsi

Last synced: 5 months ago
JSON representation

Jalali Date Picker is a highly customizable and user-friendly date picker component designed for Android Jetpack Compose.

Awesome Lists containing this project

README

          

# Jalali Date Picker
![JitPack](https://img.shields.io/jitpack/version/com.github.williamgates99/jalalidatepicker) ![GitHub](https://img.shields.io/github/license/WilliamGates99/JalaliDatePicker) ![platform](https://img.shields.io/badge/platform-android-success)

**Jalali Date Picker** is a highly customizable and user-friendly date picker component designed for **Android Jetpack Compose**.

Tailored specifically for the Persian (Jalali) calendar, it empowers users to select dates effortlessly through an elegant, modern interface.

The library offers a seamless experience with fluid animations, intuitive controls, and a sleek design, making it an ideal choice for developers seeking to enhance their apps with a visually appealing and culturally relevant date selection tool.



     

## Installation
### 1. Add the JitPack repository to your build file:

Kotlin DSL

```kotlin
repositories {
maven { url = uri("https://jitpack.io") }
}
```

Groovy

```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```

### 2. Add the dependency to your build.gradle.kts file:

Kotlin DSL

```kotlin
dependencies {
implementation("com.github.williamgates99:jalalidatepicker:1.0.4")
}
```

Groovy

```groovy
dependencies {
implementation 'com.github.williamgates99:jalalidatepicker:1.0.4'
}
```

## Usage
Simply use the `JalaliDatePicker` composable:
```kotlin
JalaliDatePicker(
onSelectedDateChange = { newSelectedDate ->
val (year, month, day) = newSelectedDate
println("Selected Jalali Date: $year/$month/$day")
},
modifier = Modifier.fillMaxWidth()
)
```

Tailor the `JalaliDatePicker` to your needs with these parameters:
* `initialSelectedDate`: The initial selected date in the Gregorian calendar.
* `selectableYearsRange`: An optional range of years that can be selected.
* `isSelectFromFutureEnabled`: If `false`, the maximum selectable date will be the current date. If `true`, future dates can be selected.
* `datePickerDefaults`: Configuration options for the date picker, such as the number of selectable years and future years.
* `dividersHeight`: The height of the dividers between the date picker wheels.
* `dividersColor`: The color of the dividers.
* `textStyle`: The text style to use for the date picker labels.
* `showMonthNumber`: If `true`, the month number will be displayed along with the month name.
* `onSelectedDateChange`: A callback that is invoked when the selected date changes.

## Contribution
We welcome any contributions from the community!

Found a bug or have a feature idea? Please open an [issue](https://github.com/WilliamGates99/JalaliDatePicker/issues) on our GitHub repository to let us know.

Ready to contribute code? Simply fork the repository and submit a pull request.

## License
This project is licensed under the [MIT License](LICENSE).