我正在尝试在 AngularJS 中实现 jQuery datepicker。我按照 url https://github.com/angular-ui/ui-date
进行操作,并执行了相同的操作。但我不知道自己落后在哪里。我看不到日期选择器。我只能看到文本框。除此之外,我还应该遵循其他步骤在 AngularJS 中实现 jQuery datepicker 吗?
HTML:
<div class="to-show">
<div ng-controller="DatepickerDemoCtrl">
<small>Date</small>
<div class="row">
<div class="col-md-12">
<input ui-date="dateOptions" name="DateOfBirth">
</div>
</div>
Controller :
myApp.controller('DatepickerDemoCtrl', function ($scope) {
$scope.dateOptions = {
changeYear: true,
changeMonth: true,
yearRange: '1900:-0'
};
});
我已经添加了给定的脚本文件和 CSS 文件 谁能帮我解决这个问题吗?
最佳答案
您是否已将“ng-app”属性添加到您的页面?
关于javascript - jQuery 日期选择器在 AngularJS 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29011828/