Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何在剑道计划中自定义“今天”按钮_Angularjs_Kendo Scheduler - Fatal编程技术网

Angularjs 如何在剑道计划中自定义“今天”按钮

Angularjs 如何在剑道计划中自定义“今天”按钮,angularjs,kendo-scheduler,Angularjs,Kendo Scheduler,我正在处理kendo.ui.Scheduler。我想今天定制按钮。如果我点击今天按钮,它将导航到本地系统的当前日期。 我想导航到我在calenderoption的属性date中给出的日期,我认为最好的方法是在按钮上钩住点击事件,如下所示 $(".k-nav-today a").on("click",function(e){ var scheduler = $("#myscheduler").data("kendoScheduler"); var mydate = new D

我正在处理kendo.ui.Scheduler。我想今天定制按钮。如果我点击今天按钮,它将导航到本地系统的当前日期。
我想导航到我在calenderoption的属性date中给出的日期,我认为最好的方法是在按钮上钩住点击事件,如下所示

$(".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;
});

我不确定你所说的calenderoption到底是什么意思,但我希望这会有所帮助,我使用了jquery,但我想它将非常东东地转化为angular/other

您可以在初始化中使用内部方法:

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

Calender Option是k-Option的型号数据。请您根据我的日期和时间帮助显示currentTimeMarker