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

Enabling single click-open pop up and custom close event

1 Answer 450 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
developer
Top achievements
Rank 1
developer asked on 08 Aug 2016, 11:09 AM

Hello developer,

Thanks for the support that you have provided in the course of time for the issues that I have faced during development.

I would like to put forward two issues that I'm facing with kendo scheduler(AngularJS)..

1)Is there any way that I could enable the pop up generated by double clicking on a date to be opened by a single click ?

2)Is there any way that I could define custom close event from my controller (I'm using AngularJS Kendo scheduler).

I tried by giving 

$scope.scheduleroptionds.window.close=true;

which works for the very first time but I have to reload the page every time to make it work..

Awaiting your kind reply..

Thanks again..

1 Answer, 1 is accepted

Sort by
1
Accepted
Vladimir Iliev
Telerik team
answered on 09 Aug 2016, 07:35 AM
Hello,

Please check the answers of your questions below:

1) This behavior is not supported out of the box and custom solution would be needed. You can for example bind custom event handlers after the Scheduler initialization as demonstrated below:
  • How to get the widget reference
  • Example click / touch event handler: 
    //scheduler is the Scheduler instance
    scheduler.wrapper.on("click touchend", ".k-event, .k-scheduler-header-all-day, .k-scheduler-content", function(e) {
      e.stopImmediatePropagation();
     
      if ($(e.currentTarget).is(".k-event")) {
        var eventElement = $(e.currentTarget);
        var event = scheduler.occurrenceByUid(eventElement.data("uid"));
        scheduler.editEvent(event);
      } else {
        var slot = scheduler.slotByElement(e.originalEvent.target);
        if (slot) {
          scheduler.addEvent({
            start: slot.startDate,
            end: slot.endDate,
            isAllDay: slot.isAllDay
          });
        }
      }
    });
  • Scheduler configuration: 
    editable: {
        create: false,
        update: false
    },


2) I'm not sure what exactly you are trying to achieve, however if you need to track when the edit window is closed (correct me if I'm wrong) you can achieve it using the following configuration:

$scope.schedulerOptions = {
  editable: {
    window: {
      close: function() {
        alert("edit window will be closed");
      }
    }
  },


Regards,
Vladimir Iliev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Scheduler
Asked by
developer
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or