Reputation: 61
is there a way to build a datepicker for Hijri (Islamic) calender instead of the default one?
Upvotes: 5
Views: 5706
Reputation: 780
For anyone coming later to this question, I have developed a new hijri date picker library with Jetpack Compose:
java.time.HijrahDate
class.If you are interested, you can find more on Github.
Upvotes: 0
Reputation: 16398
You can use HijriDatePicker Library:
And for implementations for other platforms, check this awesome repo.
Upvotes: 4
Reputation: 309
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.
Upvotes: 1