问题
I've a grid cloumn with xtype:datecolumn as below, Now what happens is when i want to alter the value of the cell , i.e change the time on click the cell becomes blank for editing and on clicking way the previous value comes back, I want the value to be present to edit on click
this is my gridcolumn
{
text: ' Time',
dataIndex: 'time',
xtype: 'datecolumn',
format: 'Y-m-d H:i:s',
editor: {
xtype: 'datefield',
format: 'Y-m-d H:i:s',
allowBlank: false,
maskRe: /[0-9,:,-]/
}
},
How will I be achieve this? To edit the same old value rather than going blank and choosing the new date Thanks
回答1:
It was the format issue, I fixed it..
I was getting the data from the db with the format m/d/Y H:m:s
and the the format in the grid was Y-m-d H:m:s
changing the format in the backend fixed the issue.
Thanks @UDID for pointing me to debugging.
来源:https://stackoverflow.com/questions/42920402/retain-the-already-present-value-of-the-cell-for-edit-on-click