首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UI5格式化程序不工作

UI5格式化程序不工作
EN

Stack Overflow用户
提问于 2016-12-20 06:19:20
回答 0查看 635关注 0票数 0

我在让这个简单的格式化程序工作时遇到了麻烦,我不知道出了什么问题。

代码语言:javascript
复制
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))
                    }
                }
            })
        );
    }
});
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41231927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档