androidcalendargregorian-calendardatepickerdialog

Android Use Non-Gregorian Calendars


I'm creating a DatePickerDialogFragment where the user will select date of birth. I am wanting to make sure I can handle dates which are non-gregorian. I have not been able to change which type of calendar to use on my device. Does Android give the user the capability to switch the calendar type? If so what are the steps? I have had no success in the settings so far.


Solution

  • Android does not seem to support any other calendars. In fact, the Calendar class only has one direct subclass: GregorianCalendar.

    See the Android API reference for the Calendar class.

    For supporting another calendar in the DatePickerDialogFragment you will have to implement it yourself.