在网格中的日期过滤器期间,出现此错误。
Uncaught TypeError: date.getTime is not a function
at Object.clearTime (ext-all-rtl-debug.js?_dc=1591679946477:6514)
at constructor.convertDateOnly [as _convert] (ext-all-rtl-debug.js?_dc=1591679946477:237750)
at constructor.getCandidateValue (ext-all-rtl-debug.js?_dc=1591679946477:45385)
at constructor.= [as _filterFn] (ext-all-rtl-debug.js?_dc=1591679946477:45406)
at constructor.filter (ext-all-rtl-debug.js?_dc=1591679946477:45222)
at ext-all-rtl-debug.js?_dc=1591679946477:45143
at constructor.onCollectionRefresh (ext-all-rtl-debug.js?_dc=1591679946477:82919)
at constructor.updateSource (ext-all-rtl-debug.js?_dc=1591679946477:83983)
at constructor.setter [as setSource] (ext-all-rtl-debug.js?_dc=1591679946477:11193)
at constructor.onFilterChange (ext-all-rtl-debug.js?_dc=1591679946477:83515)
这是我的专栏文章。
"dataIndex" : "date",
"text" : " Date",
"minWidth" : 120.0,
"xtype" : "datecolumn",
"renderer" : "renderDate",
"filter" : {
"type" : "date"
}
这里是renderDate方法。
renderDate : function(val){
debugger;
val = new Date(val)
val = Ext.Date.format(val,'d-M-Y H:i:s T');
return val;
},
有人可以帮我解决这个问题以及如何解决它。谢谢。
在网格中的日期过滤器期间,出现此错误。未捕获到的TypeError:date.getTime在构造函数中不是Object.clearTime的函数(ext-all-rtl-debug.js?_dc = 1591679946477:6514)....
问题不在renderDate
函数中,否则它的函数名应显示在堆栈跟踪中。