Our powerful JS Calendar component
On 5.1.3 version of Calendar, when we open it throws 2 js errors in Chrome console. Please suggest.
- CalendarLoadJSError.gif (592.09 KiB) Viewed 589 times
Any way we can reproduce this? Can you upload a small test case so we can debug it?
Or set a debug breakpoint in one of those methods you see in the stack trace.
- Screenshot 2022-09-22 at 11.18.53.png (264.73 KiB) Viewed 586 times
I suggest in your reloadCalendar
method, and step it and see why it's calling Printer
methods from the load.
Thanks for the quick response Animal. I debugged and tried to show the code execution steps. Please have a look.
- CalendarLoadJSErrorDebug.gif (1 MiB) Viewed 584 times
Well, I can't pause gifs so it just disappears. It looks like you're in a loop
Why would it keep firing dateRangeChange
if the load sucessfully provided the range the view is looking for?
What are the parameters being sent calendarStart
, calendarEnd
? Where do they come from? What are they when you step the code?.
The dates needed are provided in the dateRangeChange
event. Use those.
calendaStart/End are just variables, I initialize these variables inside the dateRangeChange event already. And then being passed to reloadCalendar function. When crudManager.load gets called inside reloadCalendar, it triggers dateRangeChange event again. Which is looping itself I think is the issue here. After 3rd call it stops after logging the JS error in browser console.
You can have a look at below screen shot.
- dateRangeChange.png (39.18 KiB) Viewed 574 times
Just a thought. You haven't configured your CrudManager autoLoad : true
have you?
We set this to false in our config. Because we want to call it ourself after we initialize the start / end dates. Btw I tried after set it to true. Looks it still gives same error.
- CalendarCrudManagerConfig.png (66.39 KiB) Viewed 554 times
You explicitly call CrudManager load?