dimanche 5 octobre 2014

Ext Js grid panel empty time field

Hi

I am new to ext js

I am sorry if I couldn't explain my problem properly


My problem is the time field in grid is displays as blank


It displays the value if change both the type to string from date in model and disable rendering function formatTime .


Below is the part of response json,model and view. I have copied the code from another working site.


Please tell me how can debugg and find the solution and what will be possible reasons


**Value in json response**


"actualstarttime":"02:00 AM"


**model**


{name: 'actualstarttime', type: 'date'},


**View**


{

header: 'Time',

dataIndex: 'actualstarttime',

width: 85,

renderer: this.formatTime,


editor: {

xtype: 'timefield',

id : 'e_actualstarttime',

/*allowBlank: false,*/

minValue: '12:00 AM',

maxValue: '23:00 PM',

increment: 30,

anchor: '100%',

editable : false,

format: 'h:i A',

submitFormat: 'h:i A',

listeners: {

change: function(roweditor, changes, record, rowIndex) {

me.calculateInterval(roweditor, changes, record, rowIndex);

},

afterrender: function( roweditor, changes, record, rowIndex ) { //TECHNOKRAFTS: Added Listner to apply validation depending on the status

me.checkstatusvalidation(roweditor, changes, record, rowIndex);

}

}

}

}


**Formattime function called in render**


formatTime : function (value){

return value ? Ext.Date.dateFormat(value, 'g:i A') : '';

}






Ext Js grid panel empty time field

Aucun commentaire:

Enregistrer un commentaire