如何强制仅客户端数据源的日期值

时间:2019-02-12 15:07:16

标签: smartclient

ListGrid使用静态数据时,DataSourceclientOnly:true

给出日期字段不是js Date的静态数据,它将显示列表 enter image description here

是否有可能获得DataSource来自动将字符串日期强制转换为js Date

这是一个例子

isc.ListGrid.create({
    height: "100%",
    width: "100%",
    border: "none",
    dataSource: isc.DataSource.create({
        clientOnly: true,
        fields: [
            { name: "paymentDate", title: "Payment Date", type: "date" },
            { name: "paymentAmount", title: "Payment Amount", type: "text" }
        ],
        cacheData: [
            { paymentAmount: 500, paymentDate: "2019-02-11T08:56:57.193" }
        ]
    })
});

0 个答案:

没有答案