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

Schedular resize event - prevent & resume

5 Answers 26 Views
This is a migrated thread and some comments may be shown as answers.
RR
Top achievements
Rank 1
RR asked on 11 Sep 2019, 10:19 AM

I want to show a conformation msg on event resize. On Kendo scheduler  I can capture  "resizestart" & "resizeend" events. But i cant control the actual resize(changing date time of event by dragging) of event on conformation. It's anyway continuing.   I can prevent the event by "e.preventDefault()"  but cannot resume it if the user chooses to continue. 

Is there another solution for this?

<kendo-scheduler     
      id="kendoScheduler"
      class="Scheduler"     
      :data-source="eventList"   
      @change="onChange"  
      :all-day-event-template="templateAllDayEvent"
      @moveend="onMoveEnd"    
      @resizeend="onResizeEnd"  
      @movestart="onDragStart"
      @resizestart="onResizeStart"     
    >
 
<script lang="ts">
 
  onResizeStart(e : any)
  {
     Modal.confirm({
        Msg:"Do you want to continue",
          onOk: () => {
            this.onResizeStart;
          },
          onCancel: () => {
            e.preventDefault();
          }
      });
   }

Thank you in advance

5 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 13 Sep 2019, 06:18 AM

Hi Roshan,

Opening a pop-up within the resizestart event of the Scheduler will steal the focus from the event being resized. In consequence, the resize operation will be terminated. I am afraid that the Scheduler widget does not provide any means that would allow you to resume the resize.

If you, however, you like to open the confirmation upon resizeend, the scenario could be approached in the following way:

onResizeEnd: function(e) {
  var start = e.start;
  var end = e.end;
  var event = e.event;

  e.preventDefault();

  kendo.confirm("Do you want to resize the event?")
    .done(function(){
        event.set('start', start);
        event.set('end', end);
    })
    .fail(function(){
        
    });
}

Here you will find a small sample implementing the above. I hope that this helps. If you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
jotin
Top achievements
Rank 1
answered on 21 Sep 2019, 05:31 AM
I think you have made little mistake in this {  kendo.confirm("Do you want to resize the event?")   }  this line.
0
Petar
Telerik team
answered on 24 Sep 2019, 01:03 PM

Hi Jotin,

Can you give more details about what you find not correct in Veselin's example?  

Regards,
Petar
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
RR
Top achievements
Rank 1
answered on 25 Sep 2019, 10:08 AM
Actually this did worked for me. Thanks. 
0
Petar
Telerik team
answered on 26 Sep 2019, 12:16 PM

Hi Roshan,

Great! I am happy that everything worked as expected. 

Regards,
Petar
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
RR
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
jotin
Top achievements
Rank 1
Petar
Telerik team
RR
Top achievements
Rank 1
Share this question
or