vendredi 11 avril 2014

Datefields in IE vs Others

I know this has been asked before but due to my limited access, I am unable to review solutions.

I have the following form window defined:



Code:



payForStore = Ext.create('Ext.data.Store', {
autoDestroy: true,
fields: ['paymentfor'],
data: [{"paymentfor": "PRODUCTS"},
{"paymentfor": "SERVICES"},
{"paymentfor": "SELF-PAY"},
{"paymentfor": "OTHER"}
]
});
paySrcStore = Ext.create('Ext.data.Store', {
autoDestroy: true,
fields: ['paymentsrc'],
data: [{"paymentsrc": "PATIENT"},
{"paymentsrc": "INSURANCE"}
]
});
payMethStore = Ext.create('Ext.data.Store', {
autoDestroy: true,
fields: ['paymentmeth'],
data: [{"paymentmeth": "CASH"},
{"paymentmeth": "CHECK"},
{"paymentmeth": "CREDIT CARD"},
{"paymentmeth": "MONEY ORDER"},
{"paymentmeth": "EFT"},
{"paymentmeth": "OTHER"}
]
});
Ext.define('CPSClientApp.view.client.payform', {
extend: 'Ext.window.Window',
alias: 'widget.paydataform',
layout: 'fit',
stateful: true,
stateId: 'paydataform_state',
isNew: false,
title: 'Payment Ledger Record Editor',
width: 475,
height: 470,
modal: true,
closable: false,
shadow: 'drop',
shadowOffset: 10,
closeAction: 'hide',
items: [{
xtype: 'form',
url: './data/paydata.php',
border: false,
waitMsgTarget: true,
defaultType: 'textfield',
defaults: {
labelWidth: 110,
labelAlign: 'right',
enforceMaxLength: true,
anchor: '100%'
},
items: [{
xtype: 'hidden',
name: 'recordid'
}, {
xtype: 'fieldset',
title: 'Payment Information',
margin: 10,
padding: 10,
defaultType: 'textfield',
defaults: {
labelWidth: 110,
labelAlign: 'right',
enforceMaxLength: true,
anchor: '100%'
},
items: [{
xtype: 'datefield',
name: 'paydate',
fieldLabel: 'Payment Date',
disabled: true
}, {
xtype: 'fieldcontainer',
defaultType: 'combobox',
defaults: {
queryMode: 'local',
labelAlign: 'right',
labelWidth: 110,
listConfig: {
style: {
background: '#D8D8D8'
}
}
},
layout: 'hbox',
items: [{
xtype: 'combobox',
store: payForStore,
name: 'payfor',
fieldLabel: 'Payment For',
displayField: 'paymentfor',
valueField: 'paymentfor',
flex: 1
}, {
xtype: 'combobox',
store: paySrcStore,
name: 'paysource',
fieldLabel: 'Source',
labelWidth: 60,
displayField: 'paymentsrc',
valueField: 'paymentsrc',
width: 190
}]
}, {
name: 'sourcename',
fieldLabel: 'Source Name',
maxLength: 50,
listeners: {
blur: function (field, options) {
field.setValue(field.getValue().toUpperCase());
}
}
}, {
name: 'accountid',
fieldLabel: 'Account ID',
maxLength: 20,
listeners: {
blur: function (field, options) {
field.setValue(field.getValue().toUpperCase());
}
}
}, {
xtype: 'fieldcontainer',
layout: 'hbox',
defaults: {
queryMode: 'local',
labelAlign: 'right',
labelWidth: 110,
listConfig: {
style: {
background: '#D8D8D8'
}
}
},
layout: 'hbox',
items: [{
xtype: 'combobox',
store: payMethStore,
name: 'paymethod',
fieldLabel: 'Method',
displayField: 'paymentmeth',
valueField: 'paymentmeth',
flex: 1,
}, {
xtype: 'textfield',
name: 'payamount',
fieldLabel: 'Amount',
labelWidth: 60,
width: 165,
listeners: {
blur: function (field, options) {
newval = field.getValue().replace(/[^0-9\.]/g, '')
field.setValue(Ext.util.Format.usMoney(newval));
}
}
}]
}, {
name: 'docid',
fieldLabel: 'Document ID',
maxLength: 15,
listeners: {
blur: function (field, options) {
field.setValue(field.getValue().toUpperCase());
}
}
}, {
xtype: 'textareafield',
name: 'comments',
fieldLabel: 'Comments',
grow: true,
height: 150,
maxLength: 255,
listeners: {
blur: function (field, options) {
field.setValue(field.getValue().toUpperCase());
}
}
}]
}]
}],
buttons: [{
text: 'Save',
action: 'btn_save'
}, {
text: 'Cancel',
action: 'btn_cancel'
}]
});




Aucun commentaire:

Enregistrer un commentaire