florent37 / SingleDateAndTimePicker

You can now select a date and a time with only one widget !
Apache License 2.0
1.02k stars 333 forks source link

crash when 31st is selected #238

Closed dimabran closed 4 years ago

dimabran commented 4 years ago

Whenever 31st of a month is selected the app crashes java.lang.IndexOutOfBoundsException: Index: 30, Size: 30 at java.util.ArrayList.get(ArrayList.java:437) at com.github.florent37.singledateandtimepicker.widget.WheelPicker.setDefaultDate(WheelPicker.java:260) at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.setDefaultDate(SingleDateAndTimePicker.java:477) at com.github.florent37.singledateandtimepicker.dialog.SingleDateAndTimePickerDialog.init(SingleDateAndTimePickerDialog.java:166) at com.github.florent37.singledateandtimepicker.dialog.SingleDateAndTimePickerDialog.access$000(SingleDateAndTimePickerDialog.java:23) at com.github.florent37.singledateandtimepicker.dialog.SingleDateAndTimePickerDialog$1.onLoaded(SingleDateAndTimePickerDialog.java:56) at com.github.florent37.singledateandtimepicker.dialog.BottomSheetHelper$1$2.onPreDraw(BottomSheetHelper.java:78)

any fix for it?

LvWind commented 4 years ago

check this PR https://github.com/florent37/SingleDateAndTimePicker/pull/212

momadthenomad commented 4 years ago

If this is fixed, the issue should be closed.