新文章 网摘 文章 随笔 日记

jqGrid日期类型格式化

在jqGrid中,要展示日期类型的数据,可以直接使用函数 dateTimeFormatter: formatter:dateTimeFormatter
例:{name:'applyTime',formatter:dateTimeFormatter,sortable:false,align:'center'}

也可以在formatter跟一个函数:
例:

{ name: 'UpdateTime', index: 'UpdateTime', width: 55 ,
                    formatter:function(cellvalue, options, rowObject) {
                    return (moment(rowObject.quotedDeadline).format('YYYY-MM-DD HH:mm:ss'));
                }

 



展示:

moment.js–时间格式化处理利器 http://blog.csdn.net/gs6511/article/details/64124164
————————————————
版权声明:本文为CSDN博主「liuluteng2333」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/m0_38065515/article/details/78929620

posted @ 2021-08-12 14:24  岭南春  阅读(630)  评论(0)    收藏  举报