Kendo Untured(Promise)TypeError:无法读取未定义的属性(读取

发布于 2025-01-26 12:01:08 字数 1542 浏览 4 评论 0原文

我在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

enter image description here
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文