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

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

1 Answer 138 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rafe
Top achievements
Rank 1
Rafe asked on 01 Jun 2016, 01:53 PM

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

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 03 Jun 2016, 09:25 AM
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!
 
Tags
Scheduler
Asked by
Rafe
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or