博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Grid列开始日期、结束日期限制大小
阅读量:6594 次
发布时间:2019-06-24

本文共 1154 字,大约阅读时间需要 3 分钟。

{

                field: "startDate",
                title: '开始时间',
                headerAttributes: {
                    "class": "table-header-cell",
                    style: "text-align: center"
                },
                attributes:{style: "white-space:nowrap;text-overflow:ellipsis;"},
                width: 120,
                format: "{0:yyyy-MM-dd}",
                editor: function(container, options) {
                    var end = options.model.endDate;
                    var d;
                    if(end){
                        d=end;
                    }
                    $('<input name="' + options.field + '"/>')
                        .appendTo(container)
                        .kendoDatePicker({
                            format:"yyyy-MM-dd",
                            max:d,
                            change:function(){
                                if(this.value()!=){
                                    d = this.value();
                                }else{
                                    d= new Date(1900, 0, 1, 22, 0, 0);
                                }
                            }
                        });
                }
            },
                    {
                field: "endDate",
                title: '结束时间',
                headerAttributes: {
                    "class": "table-header-cell",
                    style: "text-align: center"
                },
                attributes:{style: "white-space:nowrap;text-overflow:ellipsis;"},
                width: 120,
                format: "{0:yyyy-MM-dd}",
                editor: function(container, options) {
                    var start = options.model.startDate;
                    var d;
                    if(start){
                        d=start;
                    }
                    $('<input name="' + options.field + '"/>')
                        .appendTo(container)
                        .kendoDatePicker({
                            format:"yyyy-MM-dd",
                            min:d,
                            change:function(){
                                if(this.value()!=){
                                    d = this.value();
                                }else{
                                    d= new Date(2099, 0, 1, 22, 0, 0);
                                }
                            }
                        });
                }
            },

转载于:https://www.cnblogs.com/chengshixiaonongming/p/10372815.html

你可能感兴趣的文章
[转]android开发之字节顺序
查看>>
基数排序:一种多关键字的排序算法,可用桶排序实现
查看>>
Eval与DataBinder.Eval的区别
查看>>
redis持久化探究
查看>>
mysql5.7配置文件(仅供参考)
查看>>
基于 K8S 构建数据中心操作系统
查看>>
Difference between HashMap and Hashtable | HashMap Vs Hashtable
查看>>
刘元普双生贵子(但行好事,莫问前程)
查看>>
Bzoj2186 [Sdoi2008]沙拉公主的困惑
查看>>
阿花宝宝 Java基础笔记 之 继承相关问答题
查看>>
让 Odoo POS 支持廉价小票打印机
查看>>
C#异常重试通用类Retry
查看>>
十五、MySQL DELETE 语句
查看>>
自己写Linux module来收集buddy info
查看>>
MATLAB获取系统时间的方法和格式输出
查看>>
Qt中 QString 转 char*
查看>>
详解Nginx服务器和iOS的HTTPS安全通信
查看>>
解决axios IE11 Promise对象未定义
查看>>
halcon算子翻译——dev_set_tool_geometry
查看>>
挑战程序设计竞赛(第2版)第112页勘误
查看>>