In a ext grid, I have a editor of a column as a textfield. The column datatype is datecolumn(I need this for time). I need to format the value from the column to the editor textfield as H:i
here is my code
xtype: 'datecolumn',
editor: {
xtype: 'textfield'
},
dateFormat: 'H:i',
renderer: function (val){
if (Ext.isDate(val)) {
return Ext.util.Format.date(val, 'H:i');
}
return val;
}
I already tried setting renderer for the textfield, and also adding listeners. also tried in the beforeedit method, but no success.
Any tips?