title: Disable Sundays of every month in MaterialDateTimePicker
body: <p>I'm using <a href="https://github.com/wdullaer/MaterialDateTimePicker" rel="nofollow noreferrer">MaterialDateTimePicker</a>. I want to disable particular weekday (like Sundays) of every month. Its mentioned in this <a href="https://stackoverflow.com/questions/35599203/disable-specific-dates-of-day-in-android-date-picker">post</a> that we can do that using this library but <code>how to disable particular weekdays?</code> I can certainly limit the number of months using the short code available but I don't want to limit number of months just disable weekdays from selection.</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MainActivity extends AppCompatActivity implements DatePickerDialog.OnDateSetListener {
  
      private TextView dateTextView;
      private CheckBox modeDarkDate;
      private CheckBox vibrateDate;
      private CheckBox dismissDate;
      private CheckBox limitDates;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          // Find our View instances
          dateTextView = (TextView)findViewById(R.id.date_textview);
          Button dateButton = (Button)findViewById(R.id.date_button);
  
  
          modeDarkDate = (CheckBox)findViewById(R.id.mode_dark_date);
          vibrateDate = (CheckBox) findViewById(R.id.vibrate_date);
          dismissDate = (CheckBox) findViewById(R.id.dismiss_date);
          limitDates = (CheckBox) findViewById(R.id.limit_dates);
  
          // check if picker mode is specified in Style.xml
          modeDarkDate.setChecked(Utils.isDarkTheme(this, modeDarkDate.isChecked()));
  
  
          // Show a datepicker when the dateButton is clicked
          dateButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Calendar now = Calendar.getInstance();
                  DatePickerDialog dpd = DatePickerDialog.newInstance(
                          MainActivity.this,
                          now.get(Calendar.YEAR),
                          now.get(Calendar.MONTH),
                          now.get(Calendar.DAY_OF_MONTH)
                  );
                  dpd.setThemeDark(modeDarkDate.isChecked());
                  dpd.vibrate(vibrateDate.isChecked());
                  dpd.dismissOnPause(dismissDate.isChecked());
  
  
                  if (limitDates.isChecked()) {
                   /*   Calendar[] dates = new Calendar[13];
                      for(int i = -6; i &lt;= 6; i++) {
                          Calendar date = Calendar.getInstance();
                          date.add(Calendar.MONTH, i);
                          dates[i+6] = date;
                      }  */
  
                  // Add code here to disbale weekdays like Sundays.
  
  
  
  
  
                     // dpd.setSelectableDays(dates);
                  }
  
                  dpd.show(getFragmentManager(), "Datepickerdialog");
              }
          });
      }
  
      @Override
      public void onResume() {
          super.onResume();
          DatePickerDialog dpd = (DatePickerDialog) getFragmentManager().findFragmentByTag("Datepickerdialog");
  
          if(dpd != null) dpd.setOnDateSetListener(this);
      }
  
  
  
      @Override
      public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
          String date = "You picked the following date: "+dayOfMonth+"/"+(++monthOfYear)+"/"+year;
          dateTextView.setText(date);
      }
  }
  </code></pre>