title: How to disable last 3 days and future DateTimePicker android
body: <p>I'm try to use DateTimePicker first time and I am confuse to disable by last 3 days and future day. Hmmm maybe I has been research in <a href="http://tips.androidgig.com/disable-future-dates-from-datepickerdialog/" rel="nofollow noreferrer">http://tips.androidgig.com/disable-future-dates-from-datepickerdialog/</a>
  but I cannot implement in my function.</p>
  
  <p>This is my function for show DateTimePicker when I click TextView</p>
  
  <pre><code>private void setDatePicker() {
  calDate1 = Calendar.getInstance();
  calDate2 = Calendar.getInstance();
  final DatePickerDialog.OnDateSetListener dateSet1 = new DatePickerDialog.OnDateSetListener() {
    @Override
    public void onDateSet(DatePicker datePicker, int year, int month, int date) {
      calDate1.set(year, month, date);
      displayDate(tvDate1, calDate1);
    }
  };
  tvDate1.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      new DatePickerDialog(TicketStatusActivity.this, dateSet1, calDate1.get(Calendar.YEAR), calDate1.get(Calendar.MONTH), calDate1.get(Calendar.DAY_OF_MONTH)).show();
    }
  });
  final DatePickerDialog.OnDateSetListener dateSet2 = new DatePickerDialog.OnDateSetListener() {
    @Override
    public void onDateSet(DatePicker datePicker, int year, int month, int date) {
      calDate2.set(year, month, date);
      displayDate(tvDate2, calDate2);
    }
  };
  tvDate2.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      new DatePickerDialog(TicketStatusActivity.this, dateSet2, calDate2.get(Calendar.YEAR), calDate2.get(Calendar.MONTH), calDate2.get(Calendar.DAY_OF_MONTH)).show();
    }
  });
  displayDate(tvDate1, calDate1);
  displayDate(tvDate2, calDate2);}
  </code></pre>
  
  <p>Sorry if this question not important and my grammar is bad
  고맙습니다</p>