In my extjs6 project I have a datefield. When I getvalue it comes back as '2017-07-26T00:00:00'. How can I convert this to 07-26-2017?
I am trying the below which is coming back blank. var newVal = Ext.Date.format(value, 'm-d-Y')
As per the docs,
Ext.Date.parse
makes a javascript date from a string.Ext.Date.format
makes a string from a javascript date.Since you need to convert a string to a string, you have to combine the two:
Ext.Date.format(Ext.Date.parse('2017-07-26T00:00:00','c'), 'm-d-Y')