-
3 Apr 2012 12:13 AM #1
Unanswered: How to convert date format from "dd/mm/yyyy" to "d/m/Y" (ExtJs format)
Unanswered: How to convert date format from "dd/mm/yyyy" to "d/m/Y" (ExtJs format)
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.
Thanks.
-
3 Apr 2012 8:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3161
You can only have one format to display but you can use altFormats config to accept different input formats that a user can type
http://docs.sencha.com/ext-js/4-0/#!...cfg-altFormatsMitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 Apr 2012 8:15 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3161
Moved to Ext JS 4 Q&A forum.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote