From 3a1889c81b248250794d29217a85fec38aaa1e55 Mon Sep 17 00:00:00 2001 From: Josh Torres Date: Sat, 26 Oct 2024 17:32:08 -0700 Subject: [PATCH] - fixes https://github.com/omnia-digital/livewire-calendar/issues/35 --- src/LivewireCalendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LivewireCalendar.php b/src/LivewireCalendar.php index 1204a8d..74c325b 100755 --- a/src/LivewireCalendar.php +++ b/src/LivewireCalendar.php @@ -175,8 +175,8 @@ public function monthGrid() $firstDayOfGrid = $this->gridStartsAt; $lastDayOfGrid = $this->gridEndsAt; - $numbersOfWeeks = floor(abs($lastDayOfGrid->diffInWeeks($firstDayOfGrid)) + 1); - $days = floor(abs($lastDayOfGrid->diffInDays($firstDayOfGrid)) + 1); + $numbersOfWeeks = floor(abs($firstDayOfGrid->diffInWeeks($lastDayOfGrid)) + 1); + $days = floor(abs($firstDayOfGrid->diffInDays($lastDayOfGrid)) + 1); if ($days % 7 != 0) { throw new Exception("Livewire Calendar not correctly configured. Check initial inputs.");