PDA

View Full Version : Need help on custom editor in json



sachin sachdeva
5 Jan 2011, 3:26 AM
Hello Sir

I am using a json in property grid and in that json i am using custom editor to put calender on editing the property grid.Now calender is working fine but when we select the date of calender it changes into format m-d-y but my requirement is i want that date in m/d/y.The code for this custom editor is given below .

customEditors : {
'Expiration Date' : new Ext.grid.GridEditor(newExt.form.DateField(
{
format : 'm/d/Y',
name :'expiryDate',
id :'expiryDate',
region : 'center',
editable : false,
minValue : (new Date()).clearTime(),
releaseDateField :'Release Date',
allowBlank : true })
),
help me

Seana
5 Jan 2011, 9:52 AM
Have you tried setting your format field to "n/j/Y" or any other format?your format string looks correct

sachin sachdeva
5 Jan 2011, 9:51 PM
Sir if i say after selection of date i need format like 16-jan-2010 is dis thing possible

Seana
6 Jan 2011, 6:23 AM
Sir if i say after selection of date i need format like 16-jan-2010 is dis thing possible

in that case you would want your format string in the form "d-M-Y" All of the formating options can be seen Here (http://dev.sencha.com/deploy/dev/docs/?class=Date).