title: Datepicker gives time not between exception
body: <p>I'm using a datepicker and want to set the min date to today and the max date to today one year ahead.</p>
  
  <p>I do this like:</p>
  
  <pre><code>datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);
              cal.add(Calendar.YEAR, 1);
              datePickerDialog.getDatePicker().setMaxDate(cal.getTimeInMillis());
  </code></pre>
  
  <p>When I don't do - 1000 then I get another exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: fromDate: Sat Apr 11 23:59:59 CEST 2015 does not precede toDate: Sat Apr 11 08:24:19 CEST 2015
  </code></pre>
  
  <p>thats because the date may not be equal to today. So I extract 1000 ms.</p>
  
  <p>I don't know how to solve the new exception. I tried to count + 1000 ms on the maxDate but that didn't solve it.</p>
  
  <p>EDIT:</p>
  
  <p>I create my cal like this:</p>
  
  <pre><code> cal = Calendar.getInstance();
          datePickerDialog = new DatePickerDialog(getActivity(), this, cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DATE));
  </code></pre>