I am using dataview control where I need to call a function from its tpl. Below is my code but its not working.
xtype: 'dataview',
scrollable: true,
tpl: new Ext.XTemplate(
'<tpl for=".">',
'<div class="messageTbl">',
'<table style="width: 100%;">',
'<tr><td>{[this.formatDate(CreationDate)]}</td><tr/>',
'</table>',
'</div>',
'</tpl>',
{
formatDate: function (date) {
return date;
}
},
}
),
You have syntax error in
formatDate
function.