This library provides a Shamsi (Persian calendar) and Persian time picker, built using Google's Material Date and Time Picker.
Date Range Picker | Date Picker | Time Picker |
---|---|---|
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.M-Erfan-Dm:persian-material-datepicker:1.0.1'
}
A date picker can be instantiated with
MaterialDatePicker.Builder.datePicker()
:
val datePicker =
MaterialDatePicker.Builder.datePicker()
.setTitleText("انتخاب تاریخ")
.build()
A date range picker can be instantiated with
MaterialDatePicker.Builder.dateRangePicker()
:
val dateRangePicker =
MaterialDatePicker.Builder.dateRangePicker()
.setTitleText("انتخاب محدوده")
.build()
A time picker can be instantiated with MaterialTimePicker.Builder
val picker =
MaterialTimePicker.Builder()
.setTimeFormat(TimeFormat.CLOCK_12H)
.setHour(12)
.setMinute(10)
.setTitleText("انتخاب زمان جلسه")
.build()
For more comprehensive documentation, please refer to the resources on the Google MaterialDatePicker and MaterialTimePicker libraries.