This is a migrated thread and some comments may be shown as answers.

Error Filtering current week in Kendo UI Scheduler

13 Answers 142 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lilan
Top achievements
Rank 2
Lilan asked on 19 May 2015, 05:43 AM

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

Sort by
0
Boyan Dimitrov
Telerik team
answered on 21 May 2015, 08:21 AM

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lilan
Top achievements
Rank 2
answered on 21 May 2015, 08:26 AM

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

0
Boyan Dimitrov
Telerik team
answered on 25 May 2015, 07:58 AM

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lilan
Top achievements
Rank 2
answered on 17 Jul 2015, 05:06 AM

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

0
Boyan Dimitrov
Telerik team
answered on 20 Jul 2015, 03:01 PM

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lilan
Top achievements
Rank 2
answered on 21 Jul 2015, 03:03 AM

Dear Boyan, 

Is there way to resolve this I meant at least a workaround solution?

 

Thanks 

Lilan

 

0
Accepted
Boyan Dimitrov
Telerik team
answered on 21 Jul 2015, 03:43 PM

Hello Lilan,

 

I am afraid that at this point there is no workaround for this case. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lilan
Top achievements
Rank 2
answered on 22 Jul 2015, 04:21 AM

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

 

0
Accepted
Boyan Dimitrov
Telerik team
answered on 23 Jul 2015, 03:07 PM

Hello Lilan,

 

I am afraid that this could not be achieved. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Yordan
Top achievements
Rank 1
answered on 28 Jul 2015, 07:30 AM

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)?

 

 

0
Lilan
Top achievements
Rank 2
answered on 28 Jul 2015, 07:40 AM

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

0
Yordan
Top achievements
Rank 1
answered on 28 Jul 2015, 07:50 AM

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...

 

0
Lilan
Top achievements
Rank 2
answered on 28 Jul 2015, 09:03 AM

H Pavel, 

Can you share the code with us that how you add dummy resource? 

Thanks,

Lilan

Tags
General Discussions
Asked by
Lilan
Top achievements
Rank 2
Answers by
Boyan Dimitrov
Telerik team
Lilan
Top achievements
Rank 2
Yordan
Top achievements
Rank 1
Share this question
or