0
ExtJS的5,我用JsonpProxy,當店同步(),瀏覽器會發送數據,如ExtJS的日期DATEFORMAT似乎不起作用
_dc 1414743789200
callback Ext.data.JsonP.callback2
records {"empid":8047,"empname":"Tom","action":1,"typeid":1,"num":1,"spec":170,"oper_id":5234,"actiontime":"2014-10-31T16:23:07","id":"jx.model.Item-1"}
type 1
的actiontime格式包括「T」我不想和我想要更改actiontime
格式records
,比如「20141031」。無論我在Model中設置了actiontime的dateFormt。 records
保持不變。
Store是:
Ext.define('MyApp.store.Item', {
extend: 'Ext.data.Store',
....
proxy: {
type: 'jsonp',
api: {
read: '',
create: 'http://192.168.202.6:8080/jx/PutAppJson.action',
update: '',
destroy: ''
},
extraParams:
{
type: '1'
},
url: 'defualt.action',
writer: {
type: 'json'
},
reader: {
type: 'json'
},
模型
{
type: 'date',
name: 'actiontime',
dateFormat: 'Y-m-d',
dateReadFormat: 'Y-m-d',
dateWriteFormat: 'Y-m-d'
}
電網是
{
xtype: 'datecolumn',
width: 200,
dataIndex: 'actiontime',
text: 'WorkTime',
format: 'Y-m-d H:i:s'
}
什麼問題?
還有'2014-10-31T16:23:07'。 – Ron 2014-10-31 09:37:37