Hi,

I have a grid with 3 columns - first & second columns are date fields and the third column is a text field.

I have an 'edit' listener on the grid. Within the listener, I do this - when Col A is edited, I set Col B's value to last day of the month selected in Col A.

When I select a date in Col A and click anywhere outside, the value is set in Col B as expected and while I click on Col B cell, the modified value is set in the date editor. But, then I tab into Col B after changing Col A, the modified value is not populated into the date editor in Col B. However, I can see that for a brief period, during the transition from A to B, the modified value is indeed present in B.

Could you please help me to understand what I am missing? Column definition and listener code fragments below. Thank you!

Code:
{
    field: {
        xtype: 'datefield',
        format: 'm/d/Y'
    },
    renderer    : this.dateRenderer,
    header        : 'Effective From',
    width        : 200,
    sortable    : true,
    dataIndex    : JSONConstants.VAL_EFF_FROM,
    format        : 'm/d/Y'
},
{
    field: {
        xtype: 'datefield',
        format: 'm/d/Y'
    },
    renderer     : this.dateRenderer,
    header        : 'Effective to',
    width        : 200,
    sortable    : true,
    dataIndex    : JSONConstants.VAL_EFF_TO,
    format        : 'm/d/Y'
},
{
    header        : 'Reported Number',
    width        : 200,
    sortable    : true,
    dataIndex    : JSONConstants.VAL,
    editor        : 'textfield',
    maskRe        : /[0-9\/]/
}
Code:
if(e.colIdx == 0)
{
    //If the From Date is updated, set the To Date to last day of the month. 
    e.record.set(JSONConstants.VAL_EFF_TO, Ext.Date.format(new Date(e.value.getFullYear(), e.value.getMonth() + 1, 0), 'm/d/Y'));
}