Efficient way to only render AllDay events in Scheduler

1 Answer 106 Views
Scheduler
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Bernd asked on 11 May 2022, 07:17 AM

Hi.

In the Month-View of the Scheduler I only would like to render the events that are allDay events. In all other views (day, week, etc) everything should show. Currently I solve this using conditional rendering but I wonder if there would be a more efficient way to achieve this. So what I do right now is that I have a custom EditItem for the MonthView and in the EditItem I do this:

    return (
        <>
            {dataItem.isAllDay && (
                    <SchedulerEditItem ...

I wonder if I somehow do this in a more efficient way by not even using the MonthView for the non all day events or so. Any ideas?

1 Answer, 1 is accepted

Sort by
1
Accepted
Konstantin Dikov
Telerik team
answered on 13 May 2022, 04:47 AM

Hello Bernd,

Thank you for reaching out to us.

The easiest way for showing only all day events in specific view is by filtering the data passed to the Scheduler conditionally (with onViewChange event).  I have prepared a simple example demonstrating such implementation:

Please give this a try and let me know if the result meets your exact requirement.

 

Regards,
Konstantin Dikov
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/.

Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
commented on 13 May 2022, 10:46 AM

Yep, that works perfectly. THANKS! :-)
Tags
Scheduler
Asked by
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Answers by
Konstantin Dikov
Telerik team
Share this question
or