Kendo Scheduler additional button in custom edit popup template

2 posts, 0 answers
  1. Markus
    Markus avatar
    71 posts
    Member since:
    Jan 2015

    Posted 02 Mar 2015 Link to this post


    I have a simple Kendo Scheduler Demo:

    In this demo I have a custom edit template defined as follows:

        <script id="editor" type="text/x-kendo-template">
           <h3>Edit meeting</h3>
               <label>Title: <input name="title" /></label>
               <label>Start: <input data-role="datetimepicker" name="start" /></label>
               <label>End: <input data-role="datetimepicker" name="end" /></label>

    This template has 2 buttons in create-new-mode and 3 buttons when in edit-mode by default.

    I am now trying to add a 4th button to the edit popup and then catch its click event and do something else (create a new popup filled with the one of the event - functionality of "edit as new").

    I am adding this button through the edit event of kendo in the case of an edit of an actual event (fired whenever the popup template loads).

          edit: function(e) {
            if (!e.event.isNew()) {
            $(".k-edit-buttons.k-state-default").prepend('<a class="k-button" id="editasnew">Edit as New</a>');

    The button has an id="editasnew", and then a click event catcher:

            console.log("edit now");
            var scheduler = $("#scheduler").data("kendoScheduler");
              console.log("add new event now");
              scheduler.addEvent({ title: "(No title)" });
            }, 2000);

    But! the click event is never fired.

    So I wonder, is there a way to add the button a different way? (parameters through a kendo function - i did not find that in the documentation)

    ..or maybe restructure the click event catcher (maybe clicking this button has some stoppropagation function given by kendo)?

    Any help appreciated!
  2. Plamen
    Plamen avatar
    3079 posts

    Posted 02 Mar 2015 Link to this post


    It seems like the click event was not added corrected. Here is the code where the click event was thrown correctly  are my side-

    Hope this will be helpful.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top