我在让这个简单的格式化程序工作时遇到了麻烦,我不知道出了什么问题。
ap.ui.jsview("splitapp.DetailPage", {
getControllerName: function() {
return "splitapp.DetailPage";
},
createContent: function(oController) {
jQuery.sap.require("sap.ui.core.format.DateFormat");
var oType = new sap.ui.model.type.DateTime({
source: {
pattern: "yyyy-MM-dd HH:mm:ss Z"
}
});
var oDateFormat = sap.ui.core.format.DateFormat.getInstance({
pattern: "MM/dd/yyyy"
});
oLayout.createRow(new sap.ui.commons.TextView({
text: "Fecha de apertura",
design: sap.ui.commons.TextViewDesign.Bold
}),
new sap.ui.commons.TextView({
text: {
path: "ticketSelected>/fechaApertura",
type: oType,
formatter: function(d) {
return oDateFormat.format(new Date(d))
}
}
})
);
}
});https://stackoverflow.com/questions/41231927
复制相似问题