diff --git a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java index eeb19702..357a67b0 100644 --- a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java +++ b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java @@ -116,7 +116,11 @@ private DatePickerDialog createDialog(Bundle args) { // the date under certain conditions. datePicker.setMinDate(RNConstants.DEFAULT_MIN_DATE); } - + + if (args.containsKey(RNConstants.ARG_MAXDATE)) { + datePicker.setMaxDate(maxDate); + } + // Only compatible with SDK 21 and above if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && args.containsKey(RNConstants.FIRST_DAY_OF_WEEK)) { final int firstDayOfWeek = args.getInt(RNConstants.FIRST_DAY_OF_WEEK);