GithubHelp home page GithubHelp logo

developer-newland-ir / persianlineardatepicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sirlordpouya/persianlineardatepicker

0.0 0.0 0.0 294 KB

Persian DatePicker library for Android applications

Home Page: https://pouyaheydari.com

License: Apache License 2.0

Kotlin 93.68% PureBasic 6.32%

persianlineardatepicker's Introduction

Persian Date Picker

An easy to use Android library to pick a date.

API Build Status 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 separator or joined together by any separator you like.

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

Description

Library

This project is made by Kotlin and AndroidX completely and is not a forked or refactored code.

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:

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

Then add the dependency:

  dependencies {
     implementation 'com.github.SirLordPouya:PersianLinearDatePicker:1.3.0'
   }

Add PersianLinearDatePicker view to your xml:

    <com.pouyaheydari.lineardatepicker.PersianLinearDatePicker
        android:id="@+id/datePicker"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
	app:defaultDay="20"
        app:defaultMonth="6"
        app:defaultYear="1400"
        app:maxYear="1420"
        app:minYear="1320" />

Note that maxYear and minYear are optional. If you dont 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

persianlineardatepicker's People

Contributors

sirlordpouya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.