本帖最后由 u011316169 于 2014-11-10 16:48:00 编辑

解决方案 »

  1.   

    setMinValue/setMaxValue肯定是支持的,死掉可能是代码在ie下的bug问题,哪里死循环了
      

  2.   

    感谢回复,我是在监听里设置的 EXT是3.4 IE 8 9都行
      editor : new Ext.form.DateField(
    {
    format : 'Y-m-d',
    editable : false,
    listeners : {
    focus : function(th){

    var begin = th.gridEditor.record.data.periodBeginDate;
    if (begin instanceof Date || begin.length>0) {
    if(begin.length>0){
    begin=new Date(begin);
    }
    th.setMinValue(begin);//只要把这行注释掉就不会卡死
    }
    },
      

  3.   

    为何没有权限编辑……
    原来IE要为组件设了ID后才可以用setMinValue/setMaxValue方法现在的问题是
    因为每一行的限制范围都不同,可否在之前使用了setMinValue/setMaxValue方法后,在另一行点击时清空其设置的值?
    (API找不到对应的办法)
      

  4.   

    periodBeginDate字段你的store怎么定义类型的,是date吗?如果是 begin=new Date(begin);就不需要了,已经是date对象IE8测试没有没问题,测试的是grid\edit-grid.html 这个示例
    {
                header: 'Available',
                dataIndex: 'availDate',
                width: 95,
                renderer: formatDate,
                editor: new fm.DateField({
                    format: 'm/d/y',
                    minValue: '01/01/06',
                    disabledDays: [0, 6],
                    disabledDaysText: 'Plants are not available on the weekends',
                    listeners: {
                        focus: function (th) {
                            var begin = th.gridEditor.record.data.availDate;
                            th.setMinValue(begin);
                        }
                    }
                })
            }
      

  5.   

    谢版主回复啦
    因为begin有两种情况:数据库读取和页面设置 数据库读取出来的是字符串 所以要加个判断而已目前暂时在setMaxValue设置比较大的日期 顶替其内容不能清空的问题