function dateEditor(container, options) {
$("<input data-bind='value:" + options.field + "' />")
.appendTo(container)
.kendoDatePicker({
format: "dd MMMM yyyy",
min:new Date(2000,0,1),
change: function (e) {
$('div[data-container-for=' + options.field + ']').find('div[class="k-widget k-tooltip k-tooltip-validation k-invalid-msg field-validation-error"]').remove();
}
});
}
startdate 和 enddate 都使用相同的函数 这是剑道代码,这里是网格表示 谁能帮我解决这个问题?
{
field: "StartDate",
title: "Subsidy starts",
hidden: true,
type: "date",
format: "{0:dd MMMM yyyy}",
editor: dateEditor,
},
{
field: "EndDate",
title: "Subsidy ends",
type: "date",
format: "{0:dd MMMM yyyy}",
editor: dateEditor,
},