json格式的日期,我怎么在extjs中的store中怎么格式化,才能显示出来,例如2012-12-30 15:31:21
json中的格式:"callBegin":{"date":1,"day":6,"hours":10,"minutes":59,"month":11,"seconds":0...
json中的格式:"callBegin":{"date":1,"day":6,"hours":10,"minutes":59,"month":11,"seconds":0,"time":1354330740000,"timezoneOffset":-480,"year":112},
extjs中
ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"./missCall.missCall?",method:"GET"}),
reader : new Ext.data.JsonReader({
totalProperty : 'total',
root : 'records',
//field:{name:'callBegin',type:'date',mapping:'callBegin.time',dateFormat:'time'},
fields : ['callerNO','callBegin'] ————》怎么定义callbegin呢?
}),
// baseParams:{start:0,limit:10}
});
取的时候:
{
header : '来电时间',
width : 240,
dataIndex : 'callBegin',
renderer : Ext.util.Format.dateRenderer('Y-m-d H:i:s')
//format:'Y-m-d H:i:s'
}/
谢谢帮助! 展开
extjs中
ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"./missCall.missCall?",method:"GET"}),
reader : new Ext.data.JsonReader({
totalProperty : 'total',
root : 'records',
//field:{name:'callBegin',type:'date',mapping:'callBegin.time',dateFormat:'time'},
fields : ['callerNO','callBegin'] ————》怎么定义callbegin呢?
}),
// baseParams:{start:0,limit:10}
});
取的时候:
{
header : '来电时间',
width : 240,
dataIndex : 'callBegin',
renderer : Ext.util.Format.dateRenderer('Y-m-d H:i:s')
//format:'Y-m-d H:i:s'
}/
谢谢帮助! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询