2

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.

Punam
  • 37
  • 6

2 Answers2

1

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.

Kat
  • 56
  • 4
0

You can use an internal method inside the initialization:

$("#scheduler").kendoScheduler({
    // ...
    navigate: function(e) {
        if (e.action === "today") {
            var mydate = new Date("2019/1/1");
            this.date(mydate);
        }
    }
});
Emanuel Saramago
  • 462
  • 4
  • 16