title: How to Hide previous dates in Date Picker in Android Xamarin
body: <p>I am Using This Code but OnDateChanged method is not called why, where am i doing mistake please help me.</p>
  
  <pre><code>public class DatePickerFragment : DialogFragment,
                                DatePickerDialog.IOnDateSetListener,DatePicker.IOnDateChangedListener
  {
  // TAG can be any string of your choice.
  public static readonly string TAG = "X:" + typeof(DatePickerFragment).Name.ToUpper();
  
  // Initialize this value to prevent NullReferenceExceptions.
  Action&lt;DateTime&gt; _dateSelectedHandler = delegate { };
  DateTime currently = DateTime.Now;
  public static DatePickerFragment NewInstance(Action&lt;DateTime&gt; onDateSelected)
  {
      DatePickerFragment frag = new DatePickerFragment();
      frag._dateSelectedHandler = onDateSelected;
  
      return frag;
  }
  
  public override Dialog OnCreateDialog(Bundle savedInstanceState)
  {
  
      DatePickerDialog dialog = new DatePickerDialog(Activity,
                                                     this,
                                                     currently.Year,
                                                     currently.Month,
                                                     currently.Day);
  
  
  
  
      return dialog;
  }
  
  
  public void OnDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth)
  {
      // Note: monthOfYear is a value between 0 and 11, not 1 and 12!
      DateTime selectedDate = new DateTime(year, monthOfYear + 1, dayOfMonth);
  
      _dateSelectedHandler(selectedDate);
  }
  
  public void OnDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth)
  {
      if (year &lt; currently.Year)
          view.UpdateDate(currently.Year, currently.Month, currently.Day);
  
      if(monthOfYear &lt; currently.Month &amp;&amp; monthOfYear == currently.Year)
          view.UpdateDate(currently.Year, currently.Month, currently.Day);
  
      if(dayOfMonth&lt; currently.Day &amp;&amp; year == currently.Year &amp;&amp;monthOfYear == currently.Month)
          view.UpdateDate(currently.Year, currently.Month, currently.Day);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I am trying to disable previous dates from date picker but date change listener is not calling . I want to hide Past dates from datepicker can you please help me how  can i  do that.</p>