ExtJS 4>网格编辑器>带有“日期字段”的编辑器xtype 未正确填充

发布于 2025-01-03 15:50:03 字数 166 浏览 2 评论 0原文

当我双击记录进行编辑时,它不会填充日期选择器(即日期选择器显示空白,即使记录具有值)。

在此处输入图像描述

我搜索了很多,但没有得到任何修复。

任何人有任何想法...?

When I double-click a record for editing, it doesn't fill the date picker (i.e. the date picker shows blank, even though the record has the value).

enter image description here

I have searched a lot, but didn't get any fix.

Anyone has any idea...?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦途 2025-01-10 15:50:03

我不知道你是否已经有了这个......但你需要确保列编辑器配置正确,例如:

columns: [{
    // column 1 - NAME
    header: 'Name',
    dataIndex: 'the_name',
    flex: 1
}, {
    // column 2 - DATE
    xtype: 'datecolumn',
    header: 'Date',
    dataIndex: 'the_date',
    width: 90,
    editor: {
        xtype: 'datefield',
        allowBlank: true,
        format: 'm/d/Y',
    }
}, {
    // column 3...
}],
//other grid configs...

I can't tell if you have this already... but you need to make sure that the column editor is configured properly, for example:

columns: [{
    // column 1 - NAME
    header: 'Name',
    dataIndex: 'the_name',
    flex: 1
}, {
    // column 2 - DATE
    xtype: 'datecolumn',
    header: 'Date',
    dataIndex: 'the_date',
    width: 90,
    editor: {
        xtype: 'datefield',
        allowBlank: true,
        format: 'm/d/Y',
    }
}, {
    // column 3...
}],
//other grid configs...
何以笙箫默 2025-01-10 15:50:03

可能您的“the_date”字段未在模型/商店配置中配置为“日期”。

Probably your 'the_date' field is not configured as 'date' in the model/store configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文