1
我正在通過在自定義格式化程序中擴展jqgrid fmatter來進行日期格式設置。如果我這樣做,那麼「查找」功能不起作用。以下是示例colModel和自定義格式化函數。如果日期格式化在jqgrid中的自定義格式化程序中完成,找不到工作
colModel = {name:currentLevelInDate, label:"Period Beginning (GMT)", index:currentLevelInDate,sorttype: "date",datefmt: datefmt, formatter:"formatDate",
unformat: 'unformatDate', formatoptions: { newformat:newFormat, srcformat:srcFormat}}
formatDate : function(cellvalue, opts, rowObject) {
...
...
var op = $.extend({}, $.jgrid.formatter.date);
if(opts.colModel.formatoptions != undefined) {
op = $.extend({}, op, opts.colModel.formatoptions);
}
cellDisplayValue = $.fmatter.util.DateFormat(op.srcformat,cellvalue,op.newformat,op);
....
return cellDisplayValue;
}