Skip to content

Android library that offers Shamsi (Persian Calendar) support, complete with a Persian time picker, all seamlessly integrated with Google's Material Datepicker and Timepicker.

Notifications You must be signed in to change notification settings

M-Erfan-Dm/persian-material-datepicker

Repository files navigation

Persian Material Date And Time Picker

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
Date Range Picker Date Picker Time Picker

Installation

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

dependencies {
    implementation 'com.github.M-Erfan-Dm:persian-material-datepicker:1.0.1'
}

Usage

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.

About

Android library that offers Shamsi (Persian Calendar) support, complete with a Persian time picker, all seamlessly integrated with Google's Material Datepicker and Timepicker.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages