title: How to disable Dates in Android Material Calender
body: <p>I'm using Material <code>CalendarView</code> and based <code>array</code> of dates <code>CalenderView</code> highlighting dates. So I want to disable the dates except Array of Dates.</p>
  
  <pre><code> datePickerDialog = new Dialog(MainActivity.getInstance());
                      datePickerDialog.show();
                      datePickerDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
                      datePickerDialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                      datePickerDialog.setCancelable(true);
                      datePickerDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
                      datePickerDialog.setContentView(R.layout.assignment_custom_datepicker);
                      materialCalendarView = (MaterialCalendarView) datePickerDialog.findViewById(R.id.calendarView);
                    //  materialCalendarView.setShowOtherDates(MaterialCalendarView.SHOW_ALL);
                      materialCalendarView.setFirstDayOfWeek(Calendar.SUNDAY);
                      materialCalendarView.invalidate();
  
                      materialCalendarView.setHeaderTextAppearance(R.style.TextAppearance_AppCompat_Medium);
                      materialCalendarView.setDateTextAppearance(R.drawable.background_solid_blue);
                      materialCalendarView.setDateTextAppearance(R.style.TextAppearance_AppCompat_Medium);
                      materialCalendarView.setWeekDayTextAppearance(R.style.TextAppearance_AppCompat_Medium);
                      materialCalendarView.setSelectionMode(MaterialCalendarView.SELECTION_MODE_SINGLE);
  
                    //  materialCalendarView.setWeekDayTextAppearance();
                      materialCalendarView.setDateTextAppearance(R.style.WalletFragmentDefaultButtonTextAppearance);
                      Calendar selectDayCalendar = Calendar.getInstance();
                      selectDayCalendar.set(mYear, mMonth, mDay);
                      materialCalendarView.addDecorators(
                              new OneDayDecorator()
                      );
                      if (calendarDays != null &amp;&amp; !calendarDays.isEmpty() ) {
                          materialCalendarView.addDecorator(new EventDecorator(Color.RED, calendarDays));
                          materialCalendarView.setOnDateChangedListener(this);
  
  
                      }
                      else
                      {
                          // materialCalendarView.setOnDateChangedListener(this);
                      }
                      if (readcalendarDays != null &amp;&amp; !readcalendarDays.isEmpty()) {
                          materialCalendarView.addDecorator(new EventDecorator(Color.GREEN, readcalendarDays));
  
                      }
  </code></pre>