Search code examples
extjsextjs6-modern

ExtJS 6 Ext.field.Date doesnt contain header of Ext.panel.Date


I need a simple way to select year with Ext.field.Date component.

Ext.panel.Date contains header with ability to select year. However, Ext.field.Date, which internally use Ext.panel.Date, doesn't contain this header.

Simple fiddle to illustrate what I mean.

How I can show this header in Ext.field.Date picker? Maybe I missed some config or so? Or its a bug and I have to fix it in the source code?


Solution

  • So it happens because the header in the calendar is empty object Ext.panel.Date

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