diff --git a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java index ea259d7b..43f2278d 100644 --- a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java +++ b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java @@ -65,7 +65,7 @@ protected void onStop() { } private void fixSpinner(Context context, int year, int month, int dayOfMonth, RNDatePickerDisplay display) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && display == RNDatePickerDisplay.SPINNER) { + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNDatePickerDisplay.SPINNER) { try { // Get the theme's android:datePickerMode Class styleableClass = Class.forName("com.android.internal.R$styleable"); diff --git a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java index 45f6df7d..073bd8d1 100644 --- a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java +++ b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java @@ -71,7 +71,7 @@ protected void onStop() { } private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView, RNTimePickerDisplay display) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && display == RNTimePickerDisplay.SPINNER) { + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNTimePickerDisplay.SPINNER) { try { Class styleableClass = Class.forName("com.android.internal.R$styleable"); Field timePickerStyleableField = styleableClass.getField("TimePicker");