If I setDefaultDate with any day that is 31, like 31 october or 31 july the app crash
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:256)
at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.setDefaultDate(SingleDateAndTimePicker.java:458)
at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.onAttachedToWindow(SingleDateAndTimePicker.java:217)
at android.view.View.dispatchAttachedToWindow(View.java:17558)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3332)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1792)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
at android.view.Choreographer.doCallbacks(Choreographer.java:790)
at android.view.Choreographer.doFrame(Choreographer.java:721)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
2018-10-24 15:38:02.473 15624-15624/com.arvum.comunitaas E/UncaughtException: 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:256)
at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.setDefaultDate(SingleDateAndTimePicker.java:458)
at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.onAttachedToWindow(SingleDateAndTimePicker.java:217)
at android.view.View.dispatchAttachedToWindow(View.java:17558)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3332)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1792)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
at android.view.Choreographer.doCallbacks(Choreographer.java:790)
at android.view.Choreographer.doFrame(Choreographer.java:721)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
If I setDefaultDate with any day that is 31, like 31 october or 31 july the app crash
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:256) at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.setDefaultDate(SingleDateAndTimePicker.java:458) at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.onAttachedToWindow(SingleDateAndTimePicker.java:217) at android.view.View.dispatchAttachedToWindow(View.java:17558) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3332) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1792) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981) at android.view.Choreographer.doCallbacks(Choreographer.java:790) at android.view.Choreographer.doFrame(Choreographer.java:721) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967) at android.os.Handler.handleCallback(Handler.java:808) at android.os.Handler.dispatchMessage(Handler.java:101) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7425) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) 2018-10-24 15:38:02.473 15624-15624/com.arvum.comunitaas E/UncaughtException: 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:256) at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.setDefaultDate(SingleDateAndTimePicker.java:458) at com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker.onAttachedToWindow(SingleDateAndTimePicker.java:217) at android.view.View.dispatchAttachedToWindow(View.java:17558) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3332) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3339) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1792) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981) at android.view.Choreographer.doCallbacks(Choreographer.java:790) at android.view.Choreographer.doFrame(Choreographer.java:721) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967) at android.os.Handler.handleCallback(Handler.java:808) at android.os.Handler.dispatchMessage(Handler.java:101) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7425) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)