1. 首页
  2. 课程学习
  3. 嵌入式
  4. Extjs TimeField 显示正常时间格式的代码

Extjs TimeField 显示正常时间格式的代码

上传者: 2020-12-13 09:23:15上传 PDF文件 23.11KB 热度 22次
如果想正确显示,一般的方法都是改后台代码,使日期时间格式变为string返回,我解决的方法是重写TimeField 的setValue ,具体代码如下: 代码如下:Ext.override(Ext.form.TimeField, { getValue: function () { return this.value; }, setValue: function (v) { this.value = v; this.setRawValue(this.formatValue(v)); return this; }, formatValue: function (v) { if (v.length
下载地址
用户评论