Try out with these library :
dependencies {
implemantation 'com.savvi.datepicker:rangepicker:1.3.0'
}
Inside layout :
<com.savvi.rangedatepicker.CalendarPickerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
android:clipToPadding="false"
app:tsquare_orientation_horizontal="false"
app:tsquare_dividerColor="@color/transparent"
app:tsquare_headerTextColor="@color/custom_header_text"
/>
Initialize it in Java Class
calendar.init(lastYear.getTime(), nextYear.getTime()) //
.inMode(CalendarPickerView.SelectionMode.RANGE)
.withSelectedDate(new Date())
// deactivates given dates, non selectable
.withDeactivateDates(list)
// highlight dates in red color, mean they are aleady used.
.withHighlightedDates(arrayList)
// add subtitles to the dates pass a arrayList of SubTitle objects with date and text
.withSubtitles(getSubtitle())
More : https://github.com/savvisingh/DateRangePicker