5

is there a way to build a datepicker for Hijri (Islamic) calender instead of the default one?

Ahmad Dwaik 'Warlock'
  • 5,953
  • 5
  • 34
  • 56
Amira
  • 61
  • 1
  • 5
  • have a look here: http://stackoverflow.com/questions/13016365/java-library-for-hijri-umm-al-qura-calendar/18692366#18692366 – agamov Apr 07 '14 at 08:20
  • Thanks! but it doesn't show the Hijri calender. – Amira Apr 07 '14 at 08:49
  • You can use the Library [https://github.com/ghanshyam34/HirjiGregorianCalendar](https://github.com/ghanshyam34/HirjiGregorianCalendar) Please read the detail about this and what your app need the datepicker for Hijri (Islamic) calender Hope this will help you – gpuser Mar 13 '19 at 15:02

2 Answers2

4

You can use HijriDatePicker Library:

  • Provides Date + Time pickers.
  • Supports both Gregorian and Hijri (using ummalqura-calendar library).
  • Supports Google's Material Design.
  • And works all the way to API 16.

And for implementations for other platforms, check this awesome repo.

iTurki
  • 16,292
  • 20
  • 87
  • 132
1

You would have to create an own HijriDatePickerDialog. As a starting point I'd recommend the project android-betterpickers. Its purpose is to replace the Android standard date and time pickers with the better looking ones from e.g. Google Calendar.

You could extend (pull requests welcome) the project with an HijriDatePicker based upon their implementation. The package containing their pickers would be calendardatepicker.

Beware: this only solves the visualization part - the Hijri calendar probably has different dates than the Gregorian calendar. For that you'll probably need some conversion or HijriCalendar implementation but unfortunatelly I cannot recommend anything of that kind. agamov mentioned this answer which could solve that part of your question.

Community
  • 1
  • 1
lippertsjan
  • 309
  • 1
  • 18