View Full Version : How to convert date format from "dd/mm/yyyy" to "d/m/Y" (ExtJs format)

3 Apr 2012, 12:13 AM
Hi All,

I am trying to create a ExtJs "datefield" using user's input, all are well and good, except the format given by the user.

User will give the JS format string like "dd/mm/yyyy" which will reflect change of format if applied directly to "format" attribute in "datefield".

Since "dd/mm/yyyy" will return "0606/0404/12121212" for "06/04/2012" which is "d/m/Y".

Is there any method available in Ext, to convert the format string.


3 Apr 2012, 8:14 AM
You can only have one format to display but you can use altFormats config to accept different input formats that a user can type


3 Apr 2012, 8:15 AM
Moved to Ext JS 4 Q&A forum.