Unplanned
Last Updated: 04 Jan 2023 15:31 by ADMIN
Biren
Created on: 27 Dec 2022 17:10
Category: Scheduler
Type: Feature Request
1
Timeline view that allows you to display a variable number of slots and define the duration of those slots
Currently, when the Timeline slot is set as 12 hours, for example, and click on Next/Previous button, the Scheduler will move to Next/Previous date respectively instead of the display to remaining 12 hrs time slots for the same date in comparison to the Telerik UI for ASP.NET Ajax Scheduler Timeline view.
2 comments
ADMIN
Ivan Danchev
Posted on: 04 Jan 2023 15:31

Hello Biren,

We were able to come up with a workaround: https://netcorerepl.telerik.com/GREvESPp25SX1cNd47

It involves handling the Navigate event:

.Events(ev => ev.Navigate("onNavigate"))
 In the handler we prevent the navigation, then we set the start and end times programmatically and refresh the view:

<script>
    function setNewDate(scheduler, newStart, newEnd) {
        scheduler.setOptions({
        date: new Date(newStart),
        startTime: new Date(newStart),
        endTime: new Date(newEnd),
        })
        
        scheduler.date(new Date(newStart));
        scheduler.view(scheduler.view().name);
    }

    function onNavigate(e) {
        if(e.action == "next") {
            e.preventDefault();
            //create new start and end times that are 8h after the current ones
            var newStart = e.sender.options.startTime.setHours(e.sender.options.startTime.getHours() + 8);
            var newEnd = e.sender.options.endTime.setHours(e.sender.options.endTime.getHours() + 8);

            setNewDate(e.sender, newStart, newEnd)
        }
        if(e.action == "previous") {
            e.preventDefault();
            //create new start and end times that are 8h before the ones
            var newStart = e.sender.options.startTime.setHours(e.sender.options.startTime.getHours() - 8);
            var newEnd = e.sender.options.endTime.setHours(e.sender.options.endTime.getHours() - 8);

            setNewDate(e.sender, newStart, newEnd)
        }
    }
</script>


Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Biren
Posted on: 29 Dec 2022 07:03

Hi Telerik Team,

Please provide any fix for this option until it include with future release.

Thank you