首页 > 解决方案 > ExtJS 6 Ext.field.Date 不包含 Ext.panel.Date 的标题

问题描述

我需要一种简单的方法来选择带有Ext.field.Date组件的年份。

Ext.panel.Date包含能够选择年份的标题。但是,Ext.field.Date内部使用Ext.panel.Date的 不包含此标头。

简单的小提琴来说明我的意思。

如何在Ext.field.Date选择器中显示此标题?也许我错过了一些配置?或者它是一个错误,我必须在源代码中修复它?

标签: extjsextjs6-modern

解决方案


所以它发生是因为日历中的标题是空对象Ext.panel.Date

override: 'Ext.panel.Date',
constructor: function(config){
    delete config.header
    this.callParent([config])
},

推荐阅读