To fix this, first add the following to where ever you are inflating your datepicker:
this.datePicker = (DatePicker) view.findViewById(R.id.datePicker); // hack also added to styleif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { Calendar calendar1 = Calendar.getInstance(); calendar1.set(1900, Calendar.JANUARY, 1, 0, 0, 0); datePicker.setMinDate(calendar1.getTimeInMillis()); }
Unfortunately, the DatePicker.setMinDate is not exposed pre HONEYCOMB so to fix those apps, you can try adding this to your base application style
<!-- Base application theme. --><style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="android:startYear">1900</item> </style>