easyui datagrid 行编辑 datebox 验证

参考[url]
https://github.com/chiroru/jquery-easyui/blob/master/demo/datebox/validate.html
[/url]

editor: {type:'datebox',options:{required:true,validType:'validDate[\'yyyy-MM-dd\']' }}


//扩展验证
	$.extend($.fn.datebox.defaults.rules, { 
		validDate: {  
			validator: function(value){  
				var date = $.fn.datebox.defaults.parser(value);
				var s = $.fn.datebox.defaults.formatter(date);
				return s==value; 
			},  
			message: '请输入正确日期格式.'  
		}
	});

你可能感兴趣的:(datagrid)