I am having a datefield control in my page.
maxValue: new Date(),
value: new Date(),
disabledDays: [0, 6],
format: 'd M Y', ///This is the format in which i want to show date in textbox (datefield)
submitFormat : 'Y m d' //this is the format in which it should return value
I want to show date in 01 Jan 2012 format which is working fine. But when I read the value of datefield. I want the value in 'Y m d' format. This is not working.
So if user have selected 16 Oct 2012, using var toDate = Ext.getCmp('to-datefield').getValue(); returns me "Tue Oct 16 00:00:00 UTC+0800 2012" instead of returning "20121610". How can i make this control to return date in 'Y m d' format???
var toDate = Ext.getCmp('to-datefield').getValue();
I want to store the date as 20121610 (Y m d format). I also want to know how can i assign this value (20121610) back to datefield control when i am loading the control.