Declined
Last Updated: 12 Dec 2022 10:59 by ADMIN
Paul
Created on: 28 Nov 2022 18:54
Category: Kendo UI for jQuery
Type: Bug Report
0
Changing dates does not redraw the scheduler unless it is visible

In my application, when a user changes their view date on the scheduler, there are two other schedulers on the other two tabs of the tab strip that are not visible. The dates here get changed too. This happens in a navigate event. They end up in a broken state from this. It seems the issue is that they are not visible so rendering is not happening. I found a hacky way to work around this. I am adding a newDate property and a needRefresh property to the scheduler. When a tab is activated, the scheduler in that tab is checked. If it needs a refresh, it is refreshed. If it has a new date, that is also set.

3 comments
ADMIN
Neli
Posted on: 12 Dec 2022 10:59

Hello Paul,

Although the Schedulers are placed in a single TabStrip they are separate instances, thus if you need to synchronize the dates in the Schedulers you will need to do it programmatically. For example, you can add a variable that will keep the selected date. In the navigate event handler of each Scheduler you can change the value of the variable.

 navigate: function(e){
          selectedDate = e.date;
 },

Then in the activate event handler of the TabStrip, you can find the currently displayed Scheduler and change its selected date using the date method:

 

 activate: function(ev){          
          $(ev.contentElement).find('.k-scheduler').data('kendoScheduler').date(selectedDate)          
}

Here is the modified Dojo.

As described behavior is related to customization according to a specific scenario and not to the widget's default behavior I will mark the Bug Report as 'Declined' However, if you have additional questions on the matter, please let us know.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Paul
Posted on: 05 Dec 2022 20:28

@Neli,

Mine are always the same date. The Navigate event is hooked into. When you change the date on tab 1's scheduler, the other schedulers should get updated to the same date. They must always be in sync for me. But setting the date while the scheduler is not visible doesn't seem to work right.

ADMIN
Neli
Posted on: 05 Dec 2022 12:43

Hi Paul,

I tried to replicate the issue. I added three Schedulers in three tabs of a TabStrip. However, the Schedulers seem rendered correctly on my side after selecting different tabs and changing dates. You could see the behavior in the screencast linked here.  And linked here you can find the Dojo example used in the screencast. Please let me know the steps that I am missing in order to replicate the issue.

Looking forward to your reply.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.