Scheduler Item Width splits for each day

1 Answer 62 Views
Scheduler
Shahjahan Ansari
Top achievements
Rank 1
Shahjahan Ansari asked on 24 Aug 2023, 05:48 PM
Hi, I am trying to Implement scheduler with Monthly, Week and Daily Timeline View. The performance of scheduler is really dissapointing when it comes to render large number of slots. After some tweaks with slotDuration and slotDivision, was able to make it work for me.
But there is an issue when using Timeline View. if i have an event that occurs within multiple days period. The Item is divided seperated in parts for each day, because of which the event title is repeated for each item it renders.
After exploring library, tried to implement a custom list of slots rendering for each item which would cover multiple dates for same without repeating, but was unable to achieve it.


const createSlots = (
    startDate: Date,
    endDate: Date,
    durationMinutes: number,
    ogSlot: Slot
  ) => {
    const slots = [] as Slot[];
    debugger;

    const currentSlot = dayjs(startDate);
    const endDateTime = dayjs(endDate);

    let slt = currentSlot;
    let index = 0;
    while (slt.isBefore(endDateTime)) {
      let nextSlotStart = slt.add(durationMinutes, 'minute');
      slots.push({
        start: slt.toDate(),
        end: nextSlotStart.toDate(),
        group: ogSlot.group,
        index: index,
      } as Slot);
      slt = nextSlotStart;
      index++;
    }
    return slots;
  };

  const customSchedulerItem = (props: SchedulerItemProps) => {
    var s = { ...props };
    let customSlots = createSlots(
      props.start,
      props.end,
      60 * 6,
      props.slots[0]
    );

    return (
      <Tooltip openDelay={100} position="bottom" anchorElement="pointer">
        <SchedulerItem
          {...props}
          slots={customSlots}
          style={{
            ...s.style,
            textAlign: 'start',
          }}
        />
      </Tooltip>
    );
  };
Scheduler TimelineView Customization - StackBlitz

Would be happy, if we find a solution for this.


1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 28 Aug 2023, 01:27 PM

Hello Shahjahan,

With the current implementation of the Scheduler it is not possible to render an event that occurs within multiple days as a single element. However, there is a feature request in our public feedback portal where you can vote for it and increase its priority:

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Scheduler
Asked by
Shahjahan Ansari
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or