gportela85/DateTimeField

Date is not showing if the field has a listner (spcial key event)

Closed this issue · 4 comments

Hi, i'm using you're component, nd it's great. Thanks.

I have an object like this:
{
xtype: 'datetimefield',
name: 'testDate',
itemId: 'testDate',
format: 'Y-m-d H:i:s',
listeners: {
specialkey: 'onFieldSpecialKeyEnter'
}
}
In this case the selection of the date time does not work properly, the value is not updated in the Date Field. If i remove the filter your component works great..

I've tried to debug without success. Is there a way you can test this behaviour?

I'm, using sencha extJs v.5.1.0.107

Many thanks

I think that error in DateTimeFiled.createPicker.

Picker doesnt work, when ANY listener is defined in Ext.create("Ext.ux.DateTimeField", {
....
listeners: {}
....
})

I think, them override parent listeners.

Try to use:

    createPicker: function() {
        var me = this,
            parentPicker = this.callParent();

        return Ext.create('Ext.ux.DateTimePicker', Ext.merge(me.initialConfig, parentPicker.initialConfig));
    },

Thanks for reporting it, I've been trying to avoid it but I there won't be a better way. I will need to create separate branches for ExtJS 4, 5 and 6 :/

Wow, great. That worked like a charm :)

Thanks madreason and gportela85, you are the greatest.

and once more, Great Plugin 👍

@madreason Thanks for posting the code, next time, feel free to submit a PR :)
I ran some tests and it should be fine for ExtJS 4/5/6.. I definitely need to start writing unit tests for this component.