on 07-10-2015 7:40 AM
Hi Friends,
I am Working on the Custom SAPUI5 Application Development.(Master-Detail Page). In my application I have to display the Delivery Date Value at
Table view. I have successfully achieved that. see the screen shot below for your reference.
But Now I would like to change the Deliv Date Format ( 27.08.2014 to Aug 28,2014 ).
I have tried some solutions, but nothing works for me, if change anything it will not getting displayed.
These are the steps I have tried at my Detail.view.xml.
Your source pattern is wrong. It should be yyyy.MM.dd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all. But i am using XML View type for my Detail screen. and i have set the model data like this.
<Table headerText="Items" items="{GET_PR_Details}">.
once i set it at the header level ,then i am directly calling all my required data and seeting to the table column like below.
<Text text="{Ordered}" />
<Text text="{CreatedBy}" />
<Text text="{PR_REQUESTER}" />.
That is why i am getting confused.
Thank you
Hi All, Thank you for your response. I have completed 50% of the functionality by using Formatter code.
<Text
text="{
path:'DelivDate',
formatter:'sap.ui.custom.prtracking.util.Formatter.date'
}"/>
this is my code, i am calling the Formatter (js) from this view. but the object which am passing to formatter is raw type i guess. i am getting the response like Nan0,Nan .
this is my Formatter code:
date : function (value) {
alert("inside date "+value);
if (value) {
var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "MMM dd,YYYY"});
return oDateFormat.format(new Date(value));
} else {
return value;
}
},
i need to convert the value to number type. how do i acheive this?
Thanks
JK
valueFormat="yyyy-MM-dd" displayFormat="long"
2nd, 4th, 5th example in this-SAPUI5 Explored
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
Thanks for your reply. But Unfortunately it is not working.
i guess there is something wrong at the path , isn`t?. but if i declare as
<Text text="{DelivDate}"/> it is displaying 27.08.2014.
i have implemented your idea like below:
<ColumnListItem type="Navigation" press="handleLineItemPress">
<cells>
<Text text="{PreqItem}" />
<Text
text="{path:'DelivDate', type:'sap.ui.model.type.Date', formatOptions: { style: 'long'}}" />
<Text text="{Ordered}" />
<Text text="{CreatedBy}" />
<Text text="{PR_REQUESTER}" />
</cells>
</ColumnListItem>
Thank you,
JK
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.