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

How can i set step half hour when user resize task

6 Answers 98 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Konstantin
Top achievements
Rank 1
Konstantin asked on 28 Jan 2020, 03:39 AM

Hello,

How can i set step half hour or hour when user resize task? For view 'year' step 1 day.

6 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 29 Jan 2020, 11:32 AM

Hello Konstantin,

The snap step of the Gantt will be determined by the duration of the slot for the current view. For the Year view, the duration of the step is one month. Hence, the snap step duration will also be one month (Dojo sample here: https://dojo.telerik.com/uLAbeguX). The Grid widget does not expose a configuration option that would allow you to alter the duration of that step.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Konstantin
Top achievements
Rank 1
answered on 30 Jan 2020, 08:05 AM

Hello,

This is not what I need. I'm need different the snap step duration. And important on day step it's time must be same.

In dojo https://dojo.telerik.com/uLAbeguX/3

I'm set time 8.00, when move on one month then time reset from 8 to 12.

0
Konstantin
Top achievements
Rank 1
answered on 30 Jan 2020, 10:32 AM
To keep time and custom step duration, i am use this:
gant.bind('save', function(e) {
        var isDay = gant.view().name === 'day';

        if (e.values.end) {
            if (!isDay) e.values.end.setHours(e.task.end.getHours());
            e.values.end.setMinutes(e.task.end.getMinutes());
            e.values.end.setSeconds(0);
        }
        if (e.values.start) {
            if (!isDay) e.values.start.setHours(e.task.start.getHours());
            e.values.start.setMinutes(e.task.start.getMinutes());
            e.values.start.setSeconds(0);
        }
    });
0
Veselin Tsvetanov
Telerik team
answered on 31 Jan 2020, 02:01 PM

Hello Konstantin,

I am not quite sure that I understand correctly the issue faced. Attached you will find a short screencast running the Dojo sample sent. You will notice that upon moving the event back and forth, the start time always remains 8:00 AM. May I ask you to explain a bit in detail the problem faced? Also, could you prepare a video (as the attached) demonstrating the problem?

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Konstantin
Top achievements
Rank 1
answered on 04 Feb 2020, 04:34 AM

Hello,

I am not correct write, it is happend when resize task

0
Veselin Tsvetanov
Telerik team
answered on 05 Feb 2020, 03:11 PM

Hello Konstantin,

Thank you for the clarification provided.

Upon resizing in the Timeline part of the Gantt chart, each Task will snap to the start time of the respective slot it has been resized to. As the start time for each slot in year view is 12:00 AM on the 1st day of the month, the start/end of the task will be changed to 12:00 AM. I am afraid that the above behavior of the Gantt could not be customized.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Gantt
Asked by
Konstantin
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Konstantin
Top achievements
Rank 1
Share this question
or