awesome-calendar/src/main/java/com/archit/calendardaterangepicker/customviews/DateRangeCalendarManager.java
@CalendarRangeType
    int checkDateRange(@NonNull final Calendar selectedDate) {

        final String dateStr = SIMPLE_DATE_FORMAT.format(selectedDate.getTime());

        if (minSelectedDate != null && maxSelectedDate == null) {
            final String minDateStr = SIMPLE_DATE_FORMAT.format(minSelectedDate.getTime());
            if (dateStr.equalsIgnoreCase(minDateStr)) {
                return START_DATE;
            } else {
                return NOT_IN_RANGE;
            }
        } else if (minSelectedDate != null) {
            //Min date and Max date are selected
            final long selectedDateVal = Long.parseLong(dateStr);

            final String minDateStr = SIMPLE_DATE_FORMAT.format(minSelectedDate.getTime());
            final String maxDateStr = SIMPLE_DATE_FORMAT.format(maxSelectedDate.getTime());

            final long minDateVal = Long.parseLong(minDateStr);
            final long maxDateVal = Long.parseLong(maxDateStr);

            if (selectedDateVal == minDateVal) {
                return START_DATE;
            } else if (selectedDateVal == maxDateVal) {
                return LAST_DATE;
            } else if (selectedDateVal > minDateVal && selectedDateVal < maxDateVal) {
                return MIDDLE_DATE;
            } else {
                return NOT_IN_RANGE;
            }
        } else {
            return NOT_IN_RANGE;
        }
    }
/**
     * To check whether date belongs to range or not
     *
     * @return Date type
     */
To check whether date belongs to range or not
@return Date type
To check whether date belongs to range or not @return Date type
@CalendarRangeType
    int checkDateRange(@NonNull final Calendar selectedDate) {
        final String dateStr = SIMPLE_DATE_FORMAT.format(selectedDate.getTime());
        if (minSelectedDate != null && maxSelectedDate == null) {
            final String minDateStr = SIMPLE_DATE_FORMAT.format(minSelectedDate.getTime());
            if (dateStr.equalsIgnoreCase(minDateStr)) {
                return START_DATE;
            } else {
                return NOT_IN_RANGE;
            }
        } else if (minSelectedDate != null) {
            final long selectedDateVal = Long.parseLong(dateStr);
            final String minDateStr = SIMPLE_DATE_FORMAT.format(minSelectedDate.getTime());
            final String maxDateStr = SIMPLE_DATE_FORMAT.format(maxSelectedDate.getTime());
            final long minDateVal = Long.parseLong(minDateStr);
            final long maxDateVal = Long.parseLong(maxDateStr);
            if (selectedDateVal == minDateVal) {
                return START_DATE;
            } else if (selectedDateVal == maxDateVal) {
                return LAST_DATE;
            } else if (selectedDateVal > minDateVal && selectedDateVal < maxDateVal) {
                return MIDDLE_DATE;
            } else {
                return NOT_IN_RANGE;
            }
        } else {
            return NOT_IN_RANGE;
        }
    }
@ CalendarRangeType int checkDateRange ( @ NonNull final Calendar selectedDate ) { final String dateStr = SIMPLE_DATE_FORMAT . format ( selectedDate . getTime ( ) ) ; if ( minSelectedDate != null && maxSelectedDate == null ) { final String minDateStr = SIMPLE_DATE_FORMAT . format ( minSelectedDate . getTime ( ) ) ; if ( dateStr . equalsIgnoreCase ( minDateStr ) ) { return START_DATE ; } else { return NOT_IN_RANGE ; } } else if ( minSelectedDate != null ) { final long selectedDateVal = Long . parseLong ( dateStr ) ; final String minDateStr = SIMPLE_DATE_FORMAT . format ( minSelectedDate . getTime ( ) ) ; final String maxDateStr = SIMPLE_DATE_FORMAT . format ( maxSelectedDate . getTime ( ) ) ; final long minDateVal = Long . parseLong ( minDateStr ) ; final long maxDateVal = Long . parseLong ( maxDateStr ) ; if ( selectedDateVal == minDateVal ) { return START_DATE ; } else if ( selectedDateVal == maxDateVal ) { return LAST_DATE ; } else if ( selectedDateVal > minDateVal && selectedDateVal < maxDateVal ) { return MIDDLE_DATE ; } else { return NOT_IN_RANGE ; } } else { return NOT_IN_RANGE ; } }
To check whether date belongs to range or not
 @return Date type
To check whether date belongs to range or not @return Date type
//Min date and Max date are selected