Skip to content

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

License

Notifications You must be signed in to change notification settings

XeniacDev/JalaliDatePicker

 
 

Repository files navigation

Jalali Date Picker

JitPack GitHub platform

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
repositories {
    maven { url = uri("https://jitpack.io") }
}
Groovy
repositories {
    maven { url 'https://jitpack.io' }
}

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

Kotlin DSL
dependencies {
    implementation("com.github.williamgates99:jalalidatepicker:1.0.0")
}
Groovy
dependencies {
    implementation 'com.github.williamgates99:jalalidatepicker:1.0.0'
}

Usage

Simply use the JalaliDatePicker composable:

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 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.

About

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

Resources

License

Stars

Watchers

Forks

Languages

  • Kotlin 100.0%