Kendo Untured(Promise)TypeError:无法读取未定义的属性(读取
我在kendo上有一个问题,当我尝试重新加载页面时,它可以正常工作,但是当我尝试多次重新加载时,我遇到了2个错误,请参阅下面的错误
这是否是这限制Kendo或我的代码有问题会导致错误?
我认为这里的问题是没有验证,如果min
属性存在INN,我不知道如何进行验证。
var curdate = new Date();
$calendarPopup.find('[kendo="date-picker"]').kendoDatePicker({
value: curdate,
min: curdate,
change: function (e) {
if (this.value() > curdate) {
$('[name="entry-start-time"]').data('kendoTimePicker').min('12:00 AM');
$('[name="entry-start-time"]').data('kendoTimePicker').value(curdate);
} else {
$('[name="entry-start-time"]').data('kendoTimePicker').min(curdate);
$('[name="entry-start-time"]').data('kendoTimePicker').value(curdate);
}
},
});
var date = $(`input[name='entry-start-date']`).data('kendoDatePicker');
date.min(curdate); // this is where the error pointing out
// DATETIME PICKER
$calendarPopup.find('[name="entry-start-time"]').kendoTimePicker({
value: new Date(),
dateInput: false,
});
// DROPDOWN LIST
$calendarPopup.find('[kendo="drop-down-list"]').kendoDropDownList();
}
我在控制台上看到了两个错误
I have a problem on my kendo, when i tried to reload the page, it works properly but when I tried to reload multiple times i got an 2 error, please see the error below
is this the limitation of kendo or there is something wrong with my code that causes the error?
i think the problem here is there is no validation that if min
property is exist inn the page, i dont know how to put the validation.
var curdate = new Date();
$calendarPopup.find('[kendo="date-picker"]').kendoDatePicker({
value: curdate,
min: curdate,
change: function (e) {
if (this.value() > curdate) {
$('[name="entry-start-time"]').data('kendoTimePicker').min('12:00 AM');
$('[name="entry-start-time"]').data('kendoTimePicker').value(curdate);
} else {
$('[name="entry-start-time"]').data('kendoTimePicker').min(curdate);
$('[name="entry-start-time"]').data('kendoTimePicker').value(curdate);
}
},
});
var date = $(`input[name='entry-start-date']`).data('kendoDatePicker');
date.min(curdate); // this is where the error pointing out
// DATETIME PICKER
$calendarPopup.find('[name="entry-start-time"]').kendoTimePicker({
value: new Date(),
dateInput: false,
});
// DROPDOWN LIST
$calendarPopup.find('[kendo="drop-down-list"]').kendoDropDownList();
}
I've got two error I saw on my console
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论