Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/366.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
Javascript 如何在剑道甘特图中自定义编辑器?_Javascript_Angularjs_Telerik_Kendo Gantt - Fatal编程技术网

Javascript 如何在剑道甘特图中自定义编辑器?

Javascript 如何在剑道甘特图中自定义编辑器?,javascript,angularjs,telerik,kendo-gantt,Javascript,Angularjs,Telerik,Kendo Gantt,双击任务时,将打开一个编辑器弹出窗口。我需要在此弹出窗口中自定义以下内容 删除任务字段 格式开始和结束日期 根据业务规则限制开始和结束日期 工作负载接受浮动btw 0-1。我需要它是0-100(整数) 对于某些任务,弹出窗口不应打开。(业务要求它是只读的) 这可以通过以下属性轻松完成: $('#gantt').kendoGantt({ dataSource: taskDataSource, editable: { template: $("#task-editor

双击任务时,将打开一个编辑器弹出窗口。我需要在此弹出窗口中自定义以下内容

  • 删除任务字段
  • 格式开始和结束日期
  • 根据业务规则限制开始和结束日期
  • 工作负载接受浮动btw 0-1。我需要它是0-100(整数)
  • 对于某些任务,弹出窗口不应打开。(业务要求它是只读的)

  • 这可以通过以下属性轻松完成:

    $('#gantt').kendoGantt({
        dataSource: taskDataSource,
        editable: {
            template: $("#task-editor-template").html()
        }, 
    });
    
    下面是一个模板示例:

    <script id="task-editor-template" type="text/x-kendo-template">
        <div class="k-edit-label"><label for="title">Title</label></div>
        <div data-container-for="title" class="k-edit-field"><span name="title" data-bind="text: title"></span></div>
    
        <div class="k-edit-label"><label for="start">Start</label></div>
        <div data-container-for="start" class="k-edit-field"><input data-role="datepicker" name="start" data-bind="value: start" /></div>
    
        <div class="k-edit-label"><label for="start">End</label></div>
        <div data-container-for="start" class="k-edit-field"><input data-role="datepicker" name="end" data-bind="value: end" /></div>
    </script>
    
    
    标题
    开始
    终点
    
    关于如何做到每一点,我建议您阅读以下内容:


    这可以通过在配置中添加一些附加属性来实现,其他方面,请向剑道支持团队提交申请-我刚刚在甘特图上尝试了这一点。看看“customEditorTemplate”的脚本id