Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS 4 > Grid Editor > Editor with "datefield" xtype doesn't fill properly

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...?

like image 429
Ahsan Avatar asked Feb 07 '12 14:02

Ahsan


2 Answers

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...
like image 134
egerardus Avatar answered Oct 02 '22 20:10

egerardus


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

like image 33
Marko Avatar answered Oct 02 '22 18:10

Marko