1

Material CalendarView:我想从每月的第一个日期开始显示每个月,而不是显示上个月或下个月日期的日历

 private void setStartDate() {

        calendar = LocalDate.now();
      //   calendarView.setSelectedDate(calendar);
        calendarView.getCurrentDate();


        Calendar c = Calendar.getInstance();
        Log.e("----", Calendar.DATE + "");

        c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
        calendarView.state().edit()
                .setMinimumDate(c)
                .commit();


    }
4

1 回答 1

2
 <com.prolificinteractive.materialcalendarview.MaterialCalendarView
        android:id="@+id/smallView"
        android:layout_width="@dimen/calendar_size_small"
        android:layout_height="@dimen/calendar_size_small"
        app:mcv_showOtherDates="all"
 />

只需 app:mcv_showOtherDates="all"从 xml 视图中删除行

于 2019-03-01T12:24:23.390 回答