gpt4 book ai didi

angularjs - 在 Kendo UI 中使用 AngularJS

转载 作者:行者123 更新时间:2023-12-04 04:38:05 24 4
gpt4 key购买 nike

我目前正在研究一个 AngularJS 项目。在这个项目中,我需要使用 Kendo UI 组件。我找到了 Kendo/AngularJS 指令 here .不幸的是,我一直无法让日期选择器工作。目前,我将以下代码添加到 GitHub 页面上的示例应用程序中:

<div>
<b>Birth Date</b>

<div id="theDate" ng-model="birthDate" kendo-date-picker k-format="MM/dd/yyyy"></div>
<br />
Current Choice: <div>{{birthDate}}</div>
</div>

当用户访问“/birth-date”(我在 app.js 中设置了一个路由)时, View 会根据需要出现。此 View 显示日期选择器。但是,当我选择一个日期时,该日期不会出现在文本字段中。为测试起见,我在日期选择器下方显示所选日期。我可以看到该值在我选择日期时得到更新。

我做错了什么?

谢谢!

最佳答案

以下似乎对我来说工作正常:

<div ng-controller="MyController">    
{{birthday}}
<input kendo-date-picker ng-model="birthday" k-format="MM/dd/yyyy" />
</div>

这是一个现场演示: http://jsbin.com/UhAQabi/2

关于angularjs - 在 Kendo UI 中使用 AngularJS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19381231/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com