JEECG datagrid时间控件显示问题 只显示日期 不要时分秒

/行编辑时的时间控件显示问题 不要 00:00:00.0
 $.extend($.fn.datagrid.defaults.editors,{
	 datebox: {
		init: function (container, options) {
			var input = $('').appendTo(container);
				input.datebox(options);
				return input;
			},
			destroy: function (target) {
				$(target).datebox('destroy');
			},
			getValue: function (target) {
				return $(target).datebox('getValue');
			},
			setValue: function (target, value) {
				$(target).datebox('setValue', formatDatebox(value));
			},
			resize: function (target, width) {
				$(target).datebox('resize', width);
			}
		}
}); 


    //行编辑时间格式化
function formatDatebox(value) {
	if (value == null || value == '') {
		return '';
	}
	var dt;
	if (value instanceof Date) {
		dt = value;
	}
	else {
		dt = new Date(value);
		if (isNaN(dt)) {
			dt = stringToDate(value,'-');
		}
	}
	return dt.formatDay("yyyy-MM-dd"); 
}

你可能感兴趣的:(JEECG)