title: Disable Sundays and any other Specific Date
body: <p>I want disable sundays and specific dates in particular months in android date picker</p>
  
  <p>The Datepicker I used is android <code>datepicker</code>:</p>
  
  <pre><code>Calendar calendar = Calendar.getInstance();
  calendar.add(Calendar.MONTH, 1);
  calendar.setMinimalDaysInFirstWeek(27);
  // calendar.add(Calendar.DAY_OF_MONTH, 1);
  //calendar.set(2016,11,23);
  // new   DatePickerDialog(LoginSuccess.this, listener, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)).show();
  DatePickerDialog dpDialog = new DatePickerDialog(LoginSuccess.this, listener, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
  // dpDialog.updateDate(2016,11,23);
  
  DatePicker datePicker = dpDialog.getDatePicker();
  //datePicker.updateDate(2016,11,23);
  // Date newDate = calendar.getTime();
  //dpDialog.getDatePicker().setMinDate(newDate.getTime());
  //datePicker.init();
  
  if (calendar.get(Calendar.DAY_OF_MONTH)==Calendar.SUNDAY) {
     // dpDialog.setTitle("Sorry Sundays wont be accepted");
     // dpDialog.setMessage("not selected");
     // dpDialog.show();
      //datePicker.setBackgroundColor(000000);
      Color.parseColor("#000000");
  }
  else {
      long now = System.currentTimeMillis();
  
      datePicker.setFirstDayOfWeek(Calendar.MONDAY);
      datePicker.setMinDate(now + (1000 * 60 * 60 * 24 * 1));
      datePicker.setMaxDate(calendar.getTimeInMillis());
      dpDialog.show();
  }
  
  public DatePickerDialog.OnDateSetListener listener = new DatePickerDialog.OnDateSetListener() {
      @Override
      public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
          Calendar calendar = Calendar.getInstance();
          calendar.add(Calendar.MONTH, 1);
  
          //calendar.set(2016,11,23);
          display.setText("Selected Date:" + (dayOfMonth) + "/" + (monthOfYear + 1) + "/" + year);
              Button ok = (Button) findViewById(R.id.confirm);
              ok.setOnClickListener((v) -&gt; {
                  Intent intent = new Intent(LoginSuccess.this, Confirm.class);
                  intent.putExtra("Date", dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
                  intent.putExtra("name", (String) spinnerOsversions.getSelectedItem());
                  intent.putExtra("email4", email3.toString());
                  intent.putExtra("bikeno4", bikeno3.toString());
                  intent.putExtra("fname", fname.toString());
                  //intent.putExtras(b);
                  startActivity(intent);
                  finish();
              });
      }
  </code></pre>
  
  <p><code>SetMinDate</code> and <code>setMaxdate</code> is working Perfectly but I want to only disable sundays and particular days.</p>