-
2 Apr 2012 12:55 PM #1
Answered: Functions inside itemTpl
Answered: Functions inside itemTpl
I had another question answered early regarding date formatting inside an itemTpl. The solution was to set my itemTpl as:
My question is what exactly does the ':' after dateCreated do? I've played with it and search quite a bit but haven't been able to find what all the options are there.Code:itemTpl: '<p>{displayName}{dateCreated:date("M j, Y")}</p>'
Thanks,
Brad
-
Best Answer Posted by Steffen Hiller
The : is a shortcut for Ext.util.Format methods.
You can use {[this.customMethod(values.someProperty)]} and add custom functions to your templates o use some "global" util functions without defining them for your templates.
-
2 Apr 2012 6:24 PM #2
The : is a shortcut for Ext.util.Format methods.
You can use {[this.customMethod(values.someProperty)]} and add custom functions to your templates o use some "global" util functions without defining them for your templates.Owner of 360releases Ltd. - Sencha Touch & Ext JS consulting
twitter.com/steffenhiller
extjswithrails.com, senchatouchbits.com


Reply With Quote