title: Android date popup, range
body: <p>I have a date picker that allows a user to select a date, by default this lets you change the year higher and higher to infinite or something, but I want to confine the user to a maximum year. Such as only 2 years from now.</p>
  
  <p><code>new DatePickerDialog(this, mDateSetListener, mYear, mMonth, mDay)</code></p>
  
  <p>How do I set the max date within that function?  I'm sure I can do a "if date > 2014 , then show a toast message and show the datepicker again until they select a proper date" but I would prefer to just not let the date picker function go above a certain year.</p>
  
  <p>Insight appreciated!</p>