$.each(baseOption.columns[0], function(i, item) { if (item.field == 'zzzsdqrq') { baseOption.columns[0][i].styler = function(value, rec, index) { if (value == undefined) { return ""; } var baseDate = new Date(value); var nowDate = new Date(); var left = Math.floor((baseDate.getTime() - nowDate.getTime()) / (24 * 3600 * 1000)); debugger; if (left <= 30) { return 'background-color:red;'; } return ''; } } }); });