Hi,
When the filter does no have any records for current week in the Scheduler, it shows following error in console and Scheduler will not work afterwords.
"Uncaught TypeError: Cannot read property 'timeSlotRanges' of undefined"
But this error occured only for current week and it doesn't show future or past weeks even if filter does not have any records.
Please check the demo application from below
http://dojo.telerik.com/@lilan123/UPuDE/6
Any Idea?
Thanks,
Lilan
13 Answers, 1 is accepted
Hello Lilan,
When the Scheduler widget is grouped by a resource, it expects at least one resource to be returned after the filtering. Having no resource in this case will cause an issue with time slots rendering.
Regards,
Boyan Dimitrov
Telerik
Hello Boyan,
If that is the case it should effect to every weeks, but in my case it is only effecting to current week. if you check my demo application and change
date: new Date(),
to future or past date this error doesn't come. it is only coming for the current week.
Thanks,
Lilan
Hello Lilan,
Indeed when the current time period is shown there is an indicator that marks the current day. If there are no time slots rendered ( just in this specific case) it fails to find the current day time slot and throws an error.
In one of our upcoming releases we will provide a fix, so no error will be thrown. Please note that also no indication for the current day will be displayed for this case.
As I mentioned in my previous response the grouping by resource is designed to work with at least one resource ( in order to render at least some time slots).
Regards,Boyan Dimitrov
Telerik
Hi Boyan,
As you mention there is no solution to fix timeSlotRanges issue when current week empty resource issue. But question is why it is not happening to previous or future weeks? and is there any workaround solution for this issue?
Thanks,
Lilan
Hello Lilan,
The problem is related to the today's day indicator. This is the reason why it happens only to the current week, but not to future or past weeks.
Regards,
Boyan Dimitrov
Telerik
Dear Boyan,
Is there way to resolve this I meant at least a workaround solution?
Thanks
Lilan
Hello Lilan,
I am afraid that at this point there is no workaround for this case.
Regards,
Boyan Dimitrov
Telerik
Hi Boyan,
If that is the case, Can we at least push dummy resource when it becomes zero resource and remove dummy resource when resources are available by dynamically? If it is possible, please show how it can be done?
Thanks,
Lilan
Hello Lilan,
I am afraid that this could not be achieved.
Regards,
Boyan Dimitrov
Telerik
Hi Boyan,
I find your answer offending....
We have absolutely the same problem here now and you better try to help us and help Lilan....
Q: What can you suggest as a workaround in this situation?
A:
(As far as I get it, when there are no resources, we could load an extra resource and issues should be solved => so why did you answer negative to Lilan)?
Hi Pavel,
Exactly, Thanks you so much for backing me up. As a workaround what I have done is I won't filter resources when resources became empty and hide the scheduler. that was the only workaround I could think of to resolve my issue.
May be Boyan and team can give us a better solution.
Thanks,
Lilan
Hi Lilan,
it worked with us by adding a Dummy Resource.... (so we didn't have to hide the Scheduler...)...
(We just found the problem 15 mins ago, and we have it solved by a dummy Resource...)
I don't completely understand why Boyan has rejected this option...
H Pavel,
Can you share the code with us that how you add dummy resource?
Thanks,
Lilan