johnterran
22 Nov 2011, 3:47 PM
Hi,
How do I use a spinner where display value is different from value?
ie.
I have a spinner with the values being the date format, but when I display the value,
I want to display the formatted date, instead of the format itself.
I tried processRawValue but this isn't it.
xtype: 'spinnerfield',
fieldLabel: 'Date Format',
options: ["F j, Y", "D, F j, Y", "m-d-Y", "Y-m-d", "m/d/Y", "Y/m/d"], // this is my field
processRawValue: function(v) {
return Ext.Date.format(new Date(), v);
},
Thanks
John
How do I use a spinner where display value is different from value?
ie.
I have a spinner with the values being the date format, but when I display the value,
I want to display the formatted date, instead of the format itself.
I tried processRawValue but this isn't it.
xtype: 'spinnerfield',
fieldLabel: 'Date Format',
options: ["F j, Y", "D, F j, Y", "m-d-Y", "Y-m-d", "m/d/Y", "Y/m/d"], // this is my field
processRawValue: function(v) {
return Ext.Date.format(new Date(), v);
},
Thanks
John