-
Notifications
You must be signed in to change notification settings - Fork 0
/
date pack.html
38 lines (37 loc) · 1.63 KB
/
date pack.html
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
<!DOCTYPE html>
<html ng-app="ui.bootstrap.demo" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/angular.js/1.6.1/angular.min.js"></script>
<script src="https://cdn.bootcss.com/angular-ui-bootstrap/1.3.2/ui-bootstrap-tpls.min.js"></script>
<!--<script src="/Scripts/angular-locale_zh-cn.js"></script>-->
<script>
angular.module('ui.bootstrap.demo', ['ui.bootstrap']).controller('DatepickerPopupDemoCtrl', function ($scope) {
$scope.dat = new Date();
$scope.format = "yyyy/MM/dd";
$scope.altInputFormats = ['yyyy/M!/d!'];
$scope.popup1 = {
opened: false
};
$scope.open1 = function () {
$scope.popup1.opened = true;
};
});
</script>
</head>
<body>
<div ng-controller="DatepickerPopupDemoCtrl">
<p class="form-group">
<div class="input-group">
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dat" is-open="popup1.opened" ng-required="true" close-text="关闭"
clear-text="清空" current-text="今天" alt-input-formats="altInputFormats" ng-click="open1()" />
<!--<span class="input-group-btn">-->
<!--<button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button>-->
<!--</span>-->
</div>
</p>
</div>
</body>
</html>