mohamad-amin / PersianMaterialDateTimePicker

An Android library containing a shamsi (persian calendar) date picker and a time picker with Material Design style
328 stars 89 forks source link

setMinDate doesn't work if year is before 1350 #32

Open nvdtf opened 8 years ago

nvdtf commented 8 years ago

If you call setMinDate in a picker with a persian year before 1350, the year picker doesn't show years before 1350. It seems that mMinYear is always set with DEFAULT_START_YEAR, which is 1350. The method that should set this value, setYearRange, is not used in code.

Consider removing the limit on DatePickerDialog.java:600 return mMinDate != null && mMinDate.getPersianYear() > mMinYear ? mMinDate.getPersianYear() : mMinYear;