项目作者: SirLordPouya

项目描述 :
Persian DatePicker library for Android applications
高级语言: Kotlin
项目地址: git://github.com/SirLordPouya/PersianLinearDatePicker.git
创建时间: 2020-02-04T21:42:47Z
项目社区:https://github.com/SirLordPouya/PersianLinearDatePicker

开源协议:Apache License 2.0

下载


Persian Date Picker

An easy to use Android library to pick a date.

API
Codacy Badge
ktlint



You can set the minimum and maximum dates to be shown to the user. After user selects the desired
date, you can get the year, month and day separated, or joined together by any separator character you like.

Also the numbers are shown in Persian characters by default to users.



Description

Library

This project is made in Kotlin and AndroidX.

Current Functions

Functions that are available in this library are:

  • setMaxYear
  • setMinYear
  • setDate
  • getSelectedYear
  • getSelectedMonth
  • getSelectedDay
  • getSelectedGregorianYear
  • getSelectedGregorianMonth
  • getSelectedGregorianDay
  • getFormattedDate
  • getPersianFormattedDate
  • setOnDateChangedListener

Usage

First add maven repository to your project level gradle file:

  1. allprojects {
  2. repositories {
  3. maven { url 'https://jitpack.io' }
  4. }
  5. }

Then add the dependency:

  1. dependencies {
  2. implementation ("com.github.SirLordPouya:PersianLinearDatePicker:latest_version")
  3. }

Add PersianLinearDatePicker view to your xml:

  1. <com.pouyaheydari.lineardatepicker.PersianLinearDatePicker
  2. android:id="@+id/datePicker"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. app:defaultDay="20"
  6. app:defaultMonth="6"
  7. app:defaultYear="1400"
  8. app:maxYear="1420"
  9. app:minYear="1320" ></com.pouyaheydari.lineardatepicker.PersianLinearDatePicker>

Note that maxYear and minYear are optional. If you don’t set any values for minYear or maxYear,
1320..1420 will be used as default values.

License

PersianLinearDatePicker is released under the Apache License 2.0.
See LICENSE for
details.

Copyright (c) 2020 Pouya Heydari

This App icon and style is designed by Amir Gerdakane