문제

I have a afterrender event which should be called on my datefield in my formpanel. however, it looks like it won't render, and so the afterrender event doesn't work. any ideas why?

here's my code:

    this.activityFormPanelEdit = Ext.create('Ext.form.FormPanel', {
        xtype: 'form',
        autoRender: true,
        layout: {
            align: 'stretch',
            type: 'vbox'
        },
        header: false,
        pollForChanges: false,
        items: [{
            xtype: 'form',
            layout: {
                align: 'stretch',
                type: 'hbox'
            },
            items: [
                {
                    xtype: 'datefield',
                    name: 'reminderDate',
                    itemId: 'reminderDate',
                    fieldLabel: 'Erinnerung am',
                    padding: '10',
                    style: 'background-color: red',
                    disabled: true,
                    listener: {
                        afterrender: function (c) {
                            c.inputEl.on('dblclick', function () {
                                c.setValue(new Date());
                            });
                        }
                    }
                }]
        }]
도움이 되었습니까?

해결책

You have a typo in your code.

Name of config property where you can define event handlers is listeners not listener

http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.Component-cfg-listeners

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top