【问题标题】:KendoUI Scheduler Event ColorKendo UI 调度程序事件颜色
【发布时间】:2017-01-05 06:02:02
【问题描述】:

我的resources: [] 数组中有以下代码,用于设置事件的颜色。就我而言,实际的事件磁贴不会改变颜色,但在事件的color 下拉列表中,我看到了三个预期选项,但它们没有效果。

                {
                    field: 'color',
                    dataColorField: 'color',
                    dataValueField: 'color',
                    dataSource: [
                        { text: 'blue', color: 'blue' },
                        { text: 'red', color: 'red' },
                        { text: 'green', color: 'green' }
                    ]
                }

【问题讨论】:

    标签: javascript angularjs kendo-ui kendo-scheduler


    【解决方案1】:

    在资源的 dataSource 字段中缺少“value”字段。因此显示了默认颜色。如果在资源数组的 dataSource 中添加 value 属性,您将看到不同颜色的不同资源事件。

    【讨论】:

    • 示例:dataSource: [ { taskId: 1, title: "ABC", start: "2017/1/12 11:00", end: "2017/1/12 12:00", }, ], 资源: [{ field: "taskId", dataSource: [{ color: "green", text: " ", value: 1 }] }],
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-29
    • 1970-01-01
    • 2014-02-27
    • 2013-09-30
    • 1970-01-01
    相关资源
    最近更新 更多