我使用了 angularjs twitter bootstrap datepicker。一切正常。但是当我单击弹出日期选择器的文本框时会引发错误。会有什么问题。我是 angularjs 的新手。
这是我用过的javascript
scope.today = function() {
scope.dt = new Date();
};
scope.today();
scope.showWeeks = false;
scope.toggleWeeks = function () {
scope.showWeeks = ! scope.showWeeks;
};
scope.clear = function () {
scope.dt = null;
};
scope.disabled = function(date, mode) {
return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) );
};
scope.toggleMin = function() {
scope.minDate = ( scope.minDate ) ? null : new Date();
};
scope.toggleMin();
html是
<div class="controls">
<input type="text" datepicker-popup="dd MMMM yyyy" ng-model="dt" min="'1950-06-22'" max="'2050-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" />
</div>
我有什么遗漏吗。希望有解决办法。。