2
How do I insert colored markers into datepick
using AngularJS
and ui-bootstrap
?
Page:
<!doctype html>
<html ng-app="app">
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.3.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="newjavascript.js" type="text/javascript"></script>
</head>
<body>
<div ng-controller="DatepickerCtrl">
<div tyle="display:inline-block" style="width: 310px;">
<datepicker ng-model="dt" min-date="minDate"
show-weeks="true" class="well well-sm" custom-class="getDayClass(date, mode)"></datepicker>
</div>
</div>
</body>
</html>
Angularjs:
angular.module('app', ['ngAnimate', 'ui.bootstrap']);
angular.module('app').controller('DatepickerCtrl', function ($scope) {
// $scope.toggleMin = function() {
// $scope.minDate = $scope.minDate ? null : new Date();
// };
$scope.toggleMin = function () {
$scope.maxDate = new Date(2015, 12, 12);
};
});
Welcome to Stack Overflow! For the community to help you, it’s important to explain your problem in detail. I suggest I read the articles: Tour and how to ask a question.
– Thiago Luiz Domacoski