Skip to content

Commit

Permalink
- fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtorres committed Oct 27, 2024
1 parent 31d01a4 commit 3a1889c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LivewireCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 3a1889c

Please sign in to comment.