Skip to content Skip to sidebar Skip to footer

Show Only A Single Month In A Calenderview With Navigation Between Other Months

This is a follow up question to this question: Android. CalendarView...show only one month calendar at a time I am creating a layout for a fragment which contains a CalenderView &l

Solution 1:

Calendar febFirst=Calendar.getInstance();
febFirst.set(2017, 1, 1, 0, 0, 0);
calendar.setMinDate(febFirst.getTimeInMillis());
Calendar febLast=Calendar.getInstance();
febLast.set(2017, 2, 0, 0, 0, 0);
calendar.setMaxDate(febLast.getTimeInMillis());
calendar.setDate(febFirst.getTimeInMillis());

where calendar is the CalendarView. enter image description here


Post a Comment for "Show Only A Single Month In A Calenderview With Navigation Between Other Months"