-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception Livewire Calendar not correctly configured. Check initial inputs. #22
Comments
Same problem here |
Pedro, thanks for the info. I'd modified in my component that extend LivewireCalendar and I didn't touched the original component. public function events() : Collection .... |
Setting |
You are right. The component miscalculates the end of the month. |
Same issue. For some reason, the diffInWeeks and diffInDays initially yields the correct results on mount (6 and 42 respectively), but after any livewire action is triggered, the result is now 7 and 43, which will throw the exception. |
i have the problem fixed when i added the component..
|
in my case this started only today (October again though), I updated to latest version (2.2.0) but bug persists. My fix was to copy the new calculateGridStartsEnds into my component and change to this:
As above account for timezone. I think not only is this the months moving from single to double digits but theres the clocks also change, my app went live in December. |
I made this change in
I swapped around first and last diff so the results were positive. EDIT It's likely that Laravel sets the timezone on Carbon from config already. |
Hello.
I'm ussing your calendar component and when show the october's calendar, show the exception "Livewire Calendar not correctly configured. Check initial inputs". I'd checked the code and when you calculate days in vendor/asantibanez/livewire-calendar/src/LivewireCalendar.php:179, the result is 36 because at end of october is the daylight saving time change and gridStartsAt is 2021-09-27 00:00:00.0 +02:00 and gridEndsAt is 2021-10-31 23:59:59.0 +01:00
Please, can you check this?
The text was updated successfully, but these errors were encountered: