An Android library built with jetpack compose - Persian calendar component. It's easy to use, quick to implement and can be customized according to your application color and theme.
Add the JitPack repository to settings.gradle file
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependencies to app-level build.gradle file
dependencies {
...
implementation 'com.github.AmirSinaRZ:PersianCalendar:1.0.0'
}
to show persian calendar whitout any customization:
PersianCalendar { jalaliDate, localDate ->
//do something with date here
}
localDate is java.time.LocalDate & jalaliDate is JalaliDate.kt
PersianCalendar(
modifier: Modifier = Modifier,
colors: PersianCalendarColors = PersianCalendarDefaults.getPersianCalendarColors(),
fontFamily: FontFamily = PersianCalendarDefaults.persianCalendarFont(),
initDate: JalaliDate = JalaliDate(1403, 11, 1), //default is current date
elevation: Dp = 0.dp,
contentPadding: Dp = 5.dp,
cornerRadius: Dp = 8.dp,
showFullWeekDay: Boolean = false, //true: شنبه, false: ش
animate: Boolean = true,
animatePerItem: Boolean = true,
animationDuration: Int = 200,
animationDelay: Long = 30L,
) { jalaliDate, localDate ->
// do something with date here
}
rec.mp4
Contributions are welcome! If you find a bug or would like to create a new feature, please submit a pull request.
This library is licensed under the Apache-2.0 license. See LICENSE
Developed by Amirsina Razghandi