Search code examples
angularjskendo-scheduler

How to customize Today button in Kendo schedular


I am working on kendo.ui.Scheduler. I want to customize Today button. If I click on Today button it navigates to the current date of local system. I want to navigate to the date which I have given in date property of calenderoption.


Solution

  • I believe the best way of doing so would be to hook the the click event on the button as follows

    $(".k-nav-today a").on("click",function(e){ 
         var scheduler = $("#myscheduler").data("kendoScheduler");
         var mydate = new Date("2013/6/6") // retrieve the date you want to set
         scheduler.date(mydate) // whatever date you wish too
         return false;
    });
    

    I'm unsure exactly what you mean by calenderoption however but I hope this helps, I've used jquery but I imagine it'll be quite east to translate into angular/other.