Invalid Interval error all of a sudden, no changes but my application broke.
Closed this issue · 3 comments
Hello not sure if best practice to ask but did anyone suddenly get a invalid interval issue? I've done a few things to check because my application was working literally hours before and without changing anything now it doesn't work. I've tried
- deleting node modules and package-lock json and reinstalling
- testing my app in an incognito browser
- reverting back to changes in previous commits and testing
- ensuring the start date and end date are correct
- checking if react-scheduler had any dependency changes
I know this is my issue and possibly not the react-scheduler
heres my error: RangeError: Invalid interval
at eachDayOfInterval (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:54910:11)
at rt (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84841:59)
at at (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84863:20)
at it (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84866:128)
at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:12171:26)
at updateFunctionComponent (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:14577:28)
at beginWork (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:15912:22)
at beginWork$1 (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:19749:22)
at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:19194:20)
at workLoopSync (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:19133:13)
Just wanted to know if anyone else is running into this, dates are difficult :(
TypeError: Cannot read properties of undefined (reading 'getTime')
at http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84105:52
at Array.sort ()
at v (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84105:26)
at at (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84856:20)
at it (http://localhost:5173/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=43689aa7:84866:128)
at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:12171:26)
at updateFunctionComponent (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:14577:28)
at beginWork (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:15912:22)
at beginWork$1 (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:19749:22)
at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/chunk-ZW7WJ6XU.js?v=43689aa7:19194:20)
Hi
The stack trace suggests that either start
or end
date values are invalid.
- Use empty array as
events
value to make sure calendar render empty without issues - Use a dummy events array as example to check if events render correctly (Check readme sandbox has couple of example)
If 1 & 2 has no issues, then you probably wanna examine the data (start/end dates) in your events
array
Thanks for the response. I tested 1 & 2 and it appears to have no issue so I'll take a loot at the start and end dates again