Hijri Date Picker (UmAlQuraCalendar)
This library offers a hijri (Islamic Calendar) Date Picker designed on Google's Material Design Principals For Pickers for Android 4.1 (API 16) +.
Demo | Hijri |
---|---|
![]() |
![]() |
Time | Gregorian |
![]() |
![]() |
You can report any issue on issues page. Note: If you speak Arabic, you can submit issues with Arabic language and I will check them. :)
Installation
Maven
Gradle
Usage
The library follows the same API as other pickers in the Android framework.
After adding the library, you need to:
- Implement an
onDateSet
- Create a
HijriCalendarDialog
using the supplied factory - Theme the pickers
Implement an OnTimeSetListener/OnDateSetListener
In order to receive the date set in the picker, you will need to implement the OnDateSetListener
interfaces. Typically this will be the Dialog
that creates the Pickers. The callbacks use the same API as the standard Android pickers.
Note: Months start from 0.
Create a GregorianDatePickerDialog
You will need to create a new instance of GregorianDatePickerDialog
. Once the dialogs are configured, you can call show()
.
Create a HijriDatePickerDialog
Same as GregorianDatePickerDialog
but you need to use UmmalquraCalendar
insted of Calendar
class.