Here is my code..
I'm getting model.thetimestamp from an ajax call, however I am not able to format that to date object. Im trying to do that using an anonymous function which is now in the comments. How do I format the date before showing it in the block?Code:$('<div />').addblock( { type:'common', title:'Text Block', data:{ 'id':model.id, "namne":model.name, "desc":model.desc, "labelDate":model.thetimestamp /* "labelDate": function(models.starttime){ var value = models.starttime; var d = new Date(); d.setTime(value); value = d.toLocaleDateString(); return value; } */ } });


Reply With Quote

Bookmarks