         //restricts scrolling to previous months
         if monthViews[presented]?.allowScrollToPreviousMonth == false,
             scrollView.contentOffset.x < scrollView.frame.width {
+            scrollView.setContentOffset(CGPoint(x: scrollView.frame.width, y: 0), animated: false)
+            return
+        }
+
+        //restricts scrolling to next months
+        if monthViews[presented]?.allowScrollToNextMonth == false,
+            scrollView.contentOffset.x > scrollView.frame.width {
             scrollView.setContentOffset(CGPoint(x: scrollView.frame.width, y: 0), animated: false)
             return
         }

        monthViews[identifier] = monthView
        scrollView.addSubview(monthView)
        checkScrollToPreviousDisabled()
        calendarView.coordinator?.disableDays(in: presentedMonthView)
    }



    func checkScrollToPreviousDisabled() {
        let calendar = self.calendarView.delegate?.calendar?() ?? Calendar.current

        guard let presentedMonth = monthViews[presented],
            let disableScrollingBeforeDate = calendarView.disableScrollingBeforeDate else {
                return
        }

        let convertedDate = CVDate(date: disableScrollingBeforeDate, calendar: calendar)
        presentedMonth.mapDayViews({ dayView in
            if matchedDays(convertedDate, dayView.date) {
                presentedMonth.allowScrollToPreviousMonth = false
            }
        })
    }

    func checkScrollToBeyondDisabled() {
        let calendar = self.calendarView.delegate?.calendar?() ?? Calendar.current

        guard let presentedMonth = monthViews[presented],
            let disableScrollingBeyondDate = calendarView.disableScrollingBeyondDate else {
                return
        }

        let convertedDate = CVDate(date: disableScrollingBeyondDate, calendar: calendar)
        presentedMonth.mapDayViews({ dayView in
            if matchedDays(convertedDate, dayView.date) {
                presentedMonth.allowScrollToNextMonth = false
            }
        })
    }
}

