当我在剑道网格UI中打开编辑器时,发生如下所示的错误。当在剑道网格UI中打开编辑器时发生datepicker错误
Uncaught TypeError: e.indexOf is not a function ..kendo.all.js:1179
if (value && value.indexOf('/D') === 0) {
date = dateRegExp.exec(value);
if (date) {
date = date[1];
tzoffset = offsetRegExp.exec(date.substring(1));
date = new Date(parseInt(date, 10));
if (tzoffset) {
tzoffset = parseMicrosoftFormatOffset(tzoffset[0]);
date = kendo.timezone.apply(date, 0);
date = kendo.timezone.convert(date, 0, -1 * tzoffset);
}
return date;
}
}
我想这是有约束力的问题。
下面是我的代码片段。
datasource schema。
schema : { model : { id : "cid", fields : { cid : { type : "number" }, meainInstDtm : { type : "datetime" }, } }
剑道电网
$("#grid").kendoGrid({ dataSource : dataSource, columns : [ { field : "cid", title : "CID" }, { field : "meainInstDtm", title : "meainInstDtm", width: 150, editor: dateTimeEditor, attributes: { style: "text-align: center;" } }, { command: [{name: 'edit'}, { name: 'destroy'}], title: " ", width:"180px", filterable:false }], editable: "popup" })
dateTimeEditor
function dateTimeEditor(container, options) { $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>') .appendTo(container) .kendoDateTimePicker({}); }
我不知道是什么问题。帮我。
if语句被调用的地方在哪里?检查我在这里做的道场,看看你是否可以重现这个问题:https://dojo.telerik.com/eVoNa/2 – MattOG
@MattOG顶部的代码是kendo.js。 我不会调用if语句。 –
你能提供一个我们可以测试的[jsFiddle](https://jsfiddle.net/)吗? –