如何让 Kendo DatePicker 在 MVC Partial 中工作?

How do I get a Kendo DatePicker to work inside an MVC Partial?

Index.cshtml

@Html.Partial("_DateFieldPartial", field);

_DateFieldPartial.cshtml

@model Simplifyed.Enrollment.Web.Contracts.GenericFormField
@using Kendo.Mvc.UI;
@{
ViewBag.Title = "_DateFieldPartial";
}

<div>
@(Model.FieldLabel):@(Html.Kendo().DatePicker()
    .Name("datepicker")
    .Value("10/10/2011")
    .HtmlAttributes(new { style = "width: 100%", title = "datepicker", id = "123" })
    .Deferred()
    )
</div>

我得到的只是一个文本框,无法单击。当我点击文本框时,没有任何反应。

我没有使用 NuGet 包,我只是引用 Kendo.MVC.dll

在您的布局中是否添加了

@Html.Kendo().DeferredScripts()

喜欢指定

https://docs.telerik.com/aspnet-mvc/getting-started/fundamentals#configuration-Deferring