alhazmy13 / HijriDatePicker

Material (Gregorian - Hijri) Date & Time Picker
alhazmy13.net
Apache License 2.0
143 stars 63 forks source link

Not able to move past Islamic year 1400 in the date picker dialog. #45

Closed codingtosurvive closed 3 years ago

codingtosurvive commented 4 years ago

Hi,

I have been trying to put a hijri date picker dialog to fetch date of birth. But it won't go past year 1400 Islamic year. Please help.

calmin.add(Calendar.YEAR,-80); mindate = calmin.getTimeInMillis(); maxdate = calmax.getTimeInMillis(); showDatePicker(view, mindate, maxdate, tiDob.getTag());

HijriDatePickerDialog dpd = HijriDatePickerDialog.newInstance( hijriDateSetListener, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH) ); dpd.setThemeDark(false); dpd.vibrate(false); dpd.dismissOnPause(true); dpd.showYearPickerFirst(false); dpd.setVersion(HijriDatePickerDialog.Version.VERSION_2);

    if(minDate!=0) {
        UmmalquraCalendar calMinDate = new UmmalquraCalendar();
        calMinDate.setTimeInMillis(minDate);
        dpd.setMinDate(calMinDate);
    }

    if(maxDate!=0) {
        UmmalquraCalendar calMaxDate = new UmmalquraCalendar();
        calMaxDate.setTimeInMillis(maxDate);
        dpd.setMaxDate(calMaxDate);
    }
ijoshivaibhav commented 3 years ago

hey ..any solution???

codingtosurvive commented 3 years ago

Hi, Use ummalqura-calendar 2.0.0