title: How to set a minimum date
body: <p>I have two buttons. The first button - depart and the second - arrival. At the date of departure minDate = today. And the arrival date minDate should be equal to the selected date of departure</p>
  
  <p><strong>onCreate():</strong>  </p>
  
  <pre><code>final Calendar nextYear = Calendar.getInstance();
  nextYear.add(Calendar.YEAR, 1);
  
  Date today = new Date();
  Date departs;
  
  initButtonListeners(today, nextYear);
  </code></pre>
  
  <p><strong>ButtonClickListener:</strong></p>
  
  <pre><code>public void initButtonListeners(final Date today, final Calendar nextYear) {
      findViewById(id.linearCalendar).setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              showCalendarInDialog("select departure date", R.layout.calendar_dialog_customized);
  
                  dialogView.init(today, nextYear.getTime())
                          .withSelectedDate(new Date(departData));
  
          }
      });
  
      findViewById(id.linearArrive).setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              showCalendarInDialog("select arrival date", R.layout.calendar_dialog_customized);
  
              Date dates = null;
  
                  SimpleDateFormat format = new SimpleDateFormat("dd MMM yyyy");
                  try {
                      dates = format.parse(departData);
                  } catch (ParseException e) {
                      e.printStackTrace();
                  }
                  dialogView.init(dates, nextYear.getTime())
                          .withSelectedDate(new Date(arriveData));
              }
  
          }
      });
  
  }
  </code></pre>
  
  <p><strong>OnDateClickListener:</strong></p>
  
  <pre><code>dialogView.setOnDateSelectedListener(new CalendarPickerView.OnDateSelectedListener() {
          DateFormat dateFormat = new SimpleDateFormat("dd MMM yyyy");
  
          @Override
          public void onDateSelected(Date date) {
              if(isFrom){
                  departData = dateFormat.format(date);
                  tvDepart.setText(departData);
              }else{
                  arriveData = dateFormat.format(date);
                  tvArrive.setText(arriveData);
              }
  
              theDialog.dismiss();
  
          }
  
          @Override
          public void onDateUnselected(Date date) {
  
          }
  
      });
  </code></pre>
  
  <p><strong>When click on the arrival button crashes the app shows the value zero</strong></p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>java.lang.IllegalArgumentException: The string argument is null
   at java.util.Date.parse(Date.java:373)
   at java.util.Date.&lt;init&gt;(Date.java:149)
   at com.tezz.MainContent.ContentActivity$2.onClick(ContentActivity.java:305)
   at android.view.View.performClick(View.java:4084)
   at android.view.View$PerformClick.run(View.java:16966)
   at android.os.Handler.handleCallback(Handler.java:615)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4745)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
   at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p><strong>What is not right, how to put minDate?</strong></p>