Retain the already present value of the cell for edit on click

瘦欲@ 提交于 2019-12-19 11:20:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!