Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9080

Re: XML FeedItem propery publicationDate

$
0
0

Hi Jaime, try to use a Date object. An example:

 

var oTwoDaysAgo = new Date();
oTwoDaysAgo.setDate(oTwoDaysAgo.getDate() - 2);
var oFinanceArticle = new sap.suite.ui.commons.FeedItem({  
title: "America's best little beach towns",  image: "images/grass.jpg",  link: "http://www.cnn.com/2013/06/12/travel/best-beach-towns/index.html",  source: "CNN.com - Top Stories",  publicationDate: oTwoDaysAgo
});

 

Edit: surely, this solution doesn't work for you because you are using a xml view. I don't know how define that kind of value in xml but you can set this value from controller as follow:

 

var feedItemControl = sap.ui.getCore().byId('feedItemControlId');
feedItemControl.setPublicationDate(oTwoDaysAgo);

 

Pau


Viewing all articles
Browse latest Browse all 9080

Trending Articles