【问题标题】:How to add prefix string in jqgrid column using date formatter如何使用日期格式化程序在 jqgrid 列中添加前缀字符串
【发布时间】:2014-08-01 09:56:36
【问题描述】:

我正在使用 -
formatoptions: { srcformat: 'ISO8601Long', newformat: 'H:i' }, formatter: 'date'

格式化 jqgrid 列

我想在时间之前的Stopped at中添加前缀字符串。

请帮忙... 提前谢谢...

【问题讨论】:

    标签: jquery jqgrid


    【解决方案1】:

    您可以使用custom formatter 调用原始日期格式化程序并在之前添加请求的字符串:

    formatoptions: { srcformat: "ISO8601Long", newformat: "H:i" },
    formatter: function (value, options) {
        return "Stopped at " + $.fn.fmatter.call(this, "date", value, options);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-05-13
      • 2019-02-16
      • 2022-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多