Datepicker and timepicker - set max and min values
问题 I am trying to make something like a reminder app. I want to allow the user to select date and time that is not now (at least 5 minutes from now), and I also want to disable the user from selecting a date that is too far away - 30 days for example. I created datePicker and timePicker, made them pop up on button click, but could not find way to set the min and max values. public void showDateDialog() { btnDate = (Button) findViewById(R.id.buttonDate); btnDate.setOnClickListener(new View