how to move "show all day" button to header?

2 posts, 0 answers
  1. Rafe
    Rafe avatar
    9 posts
    Member since:
    Feb 2014

    Posted 01 Jun Link to this post

    Greetings, Is there a way to easily move the "show all day" / "show business hours" out of the footer and into the header next to the view selector list? I tried moving it with jQuery, but it loses its functionality at that point:

    $(".k-scheduler-fullday").parent().insertAfter(".k-scheduler-views")

    It would be great to be able to move the button without having to recreate the functionality myself. Thanks in advance for any help!

    Rafe

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 03 Jun Link to this post

    Hi Rafe,

    In order to make the button working inside the header you should bind custom event handler to it - please check the example below:

    $('<a href="#" class="k-link k-button k-scheduler-fullday"><span class="k-icon k-i-clock"></span>Show business hours</a>').appendTo($(".k-scheduler-toolbar"));
    var scheduler = $("#scheduler").data("kendoScheduler");
    scheduler.element.on("click", ".k-scheduler-fullday", function(e) {
        e.preventDefault();
        var view = scheduler.view();
        view.trigger("navigate", {
            view: view.name || view.options.name,
            date: view.startDate(),
            isWorkDay: !view.options.showWorkHours
        });
    });
     
    Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top