I recently implemented the angularjs twitter bootstrap datepicker and everything seemed to be working smoothly. However, I encountered an error when trying to click on the text box for the popup datepicker. This issue has left me puzzled as I am still new to angularjs.
Below is the snippet of javascript code that I have utilized:
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();
Here is the corresponding html code:
<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>
I'm not sure where I might have gone wrong. Any help or solution would be greatly appreciated!