index.html
1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html ng-app="myApp">
<head lang="en" >
<meta charset="UTF-8">
<title></title>
<link href="../spm_modules/bootstrap-css/1.0.0/bootstrap.css" rel="stylesheet">
<link href="../spm_modules/xn-icon-common/1.0.0/iconfont.css" rel="stylesheet">
<link href="../demo/base.css" rel="stylesheet">
<link href="../directive/style.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
<script type="text/javascript" src="../bootstraptpls.js"></script>
</head>
<body ng-controller="MyController">
<p class="input-group">
<input type="text" class="form-control" datepicker-popup="yyyy/MM/dd" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
</p>
<script type="text/javascript">
angular.module("myApp", ["ui.bootstrap","ui.bootstrap.datepicker"])
.controller("MyController", ["$scope",function($scope) {
$scope.dt=new Date();
$scope.open = function($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.opened = true;
};
}]);
</script>
</body>
</html>