Skip to content

CalenderView Examples and Libraries

A look at the best android material CalenderView libraries with simple examples and how to use them.


Material-Calendar-View is a simple and customizable calendar widget for Android based on Material Design.

The widget has two funcionalities: a date picker to select dates (available as an XML widget and a dialog) and a classic calendar. The date picker can work either as a single day picker, many days picker or range picker.


Here are its main Features:

  • Material Design
  • Single date picker
  • Many dates picker
  • Range picker
  • Events icons
  • Fully colors customization
  • Customized font

Step 1: Installation

Make sure you are using Java 8 in your project. If not, add below code to build.gradle file:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Add the dependency to module's build.gradle file:

dependencies {
    implementation 'com.applandeo:material-calendar-view:1.7.0'

Step 2: Add to Layout

To your XML layout file add:

    android:layout_height="match_parent" />

Step 3: Write Code

Adding events with icons:

List<EventDay> events = new ArrayList<>();

Calendar calendar = Calendar.getInstance();
events.add(new EventDay(calendar, R.drawable.sample_icon));
events.add(new EventDay(calendar, new Drawable()));
//or if you want to specify event label color
events.add(new EventDay(calendar, R.drawable.sample_icon, Color.parseColor("#228B22")));

CalendarView calendarView = (CalendarView) findViewById(;

You can use our utils method to create Drawable with text:

CalendarUtils.getDrawableText(Context context, String text, Typeface typeface, int color, int size);

Clicks handling:

calendarView.setOnDayClickListener(new OnDayClickListener() {
    public void onDayClick(EventDay eventDay) {
        Calendar clickedDayCalendar = eventDay.getCalendar();    

...or long click:

calendarView.setOnDayLongClickListener(new OnDayLongClickListener() {
    public void onDayLongClick(EventDay eventDay) {
        Calendar clickedDayCalendar = eventDay.getCalendar();

If you want to get all selected days, especially if you use multi date or range picker you should use the following code:

List<Calendar> selectedDates = calendarView.getSelectedDates();
...or if you want to get the first selected day, for example in case of using single date picker, you can use:
Calendar selectedDate = calendarView.getFirstSelectedDate();

Setting a current date:

Calendar calendar = Calendar.getInstance();
calendar.set(2019, 7, 5);


Setting minumum and maximum dates:

Calendar min = Calendar.getInstance();
Calendar max = Calendar.getInstance();


Setting disabled dates:

List<Calendar> calendars = new ArrayList<>();

Previous and forward page change listeners:

calendarView.setOnPreviousPageChangeListener(new OnCalendarPageChangeListener() {
    public void onChange() {

calendarView.setOnForwardPageChangeListener(new OnCalendarPageChangeListener() {
    public void onChange() {


Read more here.