dimanche 30 mars 2014

editor timefield submit value problem

Hi Everyone



have a problem with subitted value from timefield in grid.



format is set to 'H:i' but returned value to the server and to renderer look like :



Tue Jan 01 2008 05:00:00 GMT+0100 (Central Europe Standard Time)


is that normal behavior ?



have column in grid:



{

xtype: 'gridcolumn',

renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {

console.log(value); //for checking displayed value

console.log(record);





return value;

},

width: 68,

dataIndex: 'time',

text: 'Hour',

editor: {

xtype: 'timefield',

width: 100,

fieldLabel: 'Label',

hideLabel: true,

editable: false,

format: 'H:i',

increment: 30,

submitFormat: 'H:i'

}







on cellEditing have:







onCellEditingEdit: function(editor, e, eOpts) {

id=editor.grid.getSelectionModel().getSelection()[0].get('id');

Ext.Ajax.request({

url : 'app/data/update.php' ,

params : { id:id,field:e.field,value:e.value },

method: 'GET',

success: function ( result, request ) {

var res=Ext.JSON.decode(result.responseText);



} });}



Best Regards

Martin




Aucun commentaire:

Enregistrer un commentaire