-
15 Oct 2011 5:17 PM #1
How to format dates in an XTemplate?
How to format dates in an XTemplate?
In ExtJS it's
but that results in a "Uncaught TypeError: Property 'log' of object #<Object> is not a function" in sencha-touch-all-debug-w-comments.js:22810Code:{end_date:date("Y")}
-
19 Oct 2011 7:51 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
It looks like we might have missed this functionality in the preview release. Expect this to be part of one of the upcoming releases.
-
19 Oct 2011 8:01 AM #3
Thanks for the info!
-
19 Oct 2011 5:16 PM #4
You can format the date yourself inside XTemplate by binding your data like this:
Code:{[values.end_date.format('Y')]} // works in Sencha Touch 1.0 {[Ext.Date.format(values.end_date, 'Y')]} // works in Sencha Touch 2.0 (dev preview)
-
19 Jan 2012 12:09 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-905
in
2.0.


Reply With Quote

