Our powerful JS Calendar component

Post by durban »

When I try to set today's day (here it's Wednesday) as a non working day and hide it, I got this error: 'Uncaught TypeError: can't access property "appendChild", i is null'
You can find a test case in file attachments.

minimal test case.zip
Test case for bug reproduction (put the bryntum files in the bryntum folder)
(2.72 KiB) Downloaded 11 times

Post by Animal »

nonWorkingDays is an object.


I tweaked the "Basic" example to hide Wednesdays and all views hide Wednesdays:

Screenshot 2022-09-28 at 14.26.23.png
Screenshot 2022-09-28 at 14.26.23.png (247.91 KiB) Viewed 125 times

Post by durban »

It works fine when it's loaded, but I got the error when I set the resource that hides Wednesday as the only active resource by clicking on the resource list.
In the test case, the variable nonWorkingDays is an object, but I still got the same error message

Post by Animal »

When you set a breakpoint at this line:

Screenshot 2022-09-28 at 16.36.09.png
Screenshot 2022-09-28 at 16.36.09.png (16.15 KiB) Viewed 121 times

What does the var nonWorkingDays look like?

Post by durban »

In the screenshots, the variable nonWorkingDays is an object with value 0 being true, 3 being true and 6 being true

NonWorkingDaysIsObject.png (7.25 KiB) Viewed 120 times
NonWorkingDaysIsObject (2).png
NonWorkingDaysIsObject (2).png (2.84 KiB) Viewed 120 times

Post by Animal »

Yep, that's fully correct. The the extra detail was that the view contains "today", and there you found our bug!

The updating of the current time indicator doesn't handle the today element not being there (It's a hidden non working day)

Here is a ticket for it: https://github.com/bryntum/support/issues/5333

Post Reply