-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
261 lines (228 loc) · 6.78 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html>
<head>
<title>Angular UTC Datepicker</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" href="src/css/ngUtcDatepicker.css"/>
<style type="text/css">
body {
background-color: #fff;
padding: 50px;
font: 14px/1.5 "Roboto", sans-serif;
color: #727272;
font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
color: #222;
margin: 0 0 20px;
}
p, ul, ol, table, pre, dl {
margin: 0 0 20px;
}
h1, h2, h3 {
line-height: 1.1;
}
h1 {
font-size: 28px;
}
h2 {
color: #393939;
}
h3, h4, h5, h6 {
color: #494949;
}
a {
color: #267CB9;
text-decoration: none;
}
a:hover, a:focus {
color: #069;
font-weight: bold;
}
a small {
font-size: 11px;
color: #777;
margin-top: -0.3em;
display: block;
}
a:hover small {
color: #777;
}
.wrapper {
width: 860px;
margin: 0 auto;
}
code, pre {
font-family: Courier New, monospace;
color: #333;
font-size: 12px;
}
pre {
padding: 8px 15px;
margin: 20px 0;
background: #f8f8f8;
border-radius: 5px;
border: 1px solid #e5e5e5;
overflow-x: auto;
}
input {
height: 14px;
padding: 6px 12px;
line-height: 1.42857143;
font-size: 12px;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
display: inline-block;
padding: 2px 4px;
margin: 0 5px;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
background: #ddd;
}
header {
width: 270px;
float: left;
position: fixed;
-webkit-font-smoothing: subpixel-antialiased;
}
header ul {
list-style: none;
padding: 0;
width: 270px;
}
section {
width: 500px;
float: right;
padding-bottom: 50px;
}
hr {
border: 0;
background: #e5e5e5;
height: 1px;
margin: 0 0 20px;
}
@media print, screen and (max-width: 960px) {
div.wrapper {
width: auto;
margin: 0;
}
header, section {
float: none;
position: static;
width: auto;
}
header {
padding-right: 320px;
}
section {
border: 1px solid #e5e5e5;
border-width: 1px 0;
padding: 20px 0;
margin: 0 0 20px;
}
header a small {
display: inline;
}
header ul {
position: absolute;
right: 50px;
top: 52px;
}
}
@media print, screen and (max-width: 720px) {
body {
word-wrap: break-word;
}
header {
padding: 0;
}
header ul, header p.view {
position: static;
}
pre, code {
word-wrap: normal;
}
}
@media print, screen and (max-width: 480px) {
body {
padding: 15px;
}
header ul {
width: 99%;
}
header li, header ul li + li + li {
width: 33%;
}
}
@media print {
body {
padding: 0.4in;
font-size: 12pt;
color: #444;
}
}
</style>
</head>
<body ng-app="app" ng-strict-di>
<div class="wrapper" ng-controller="ctrl as vm">
<header>
<h1>Angular UTC Datepicker</h1>
<ul>
<li>Works with Angular 1.x</li>
<li>Doesn't require jQuery UI, Bootstrap, etc.</li>
<li>Only does UTC</li>
</ul>
<p>The calendar will display above the input if it's close to the bottom of the page, and can be closed by clicking elsewhere or pressing the ESC key.</p>
</header>
<section>
<h2>Demos</h2>
<h3>Basic datepicker</h3>
<input ng-utc-datepicker ng-model="vm.date"/>
<pre><code><input ng-utc-datepicker ng-model="vm.date"/></code></pre>
<hr/>
<h3>Datepicker with trigger element</h3>
<span id="icon" class="fa fa-calendar"></span>
<input ng-utc-datepicker data-trigger="icon" ng-model="vm.date"/>
<pre><code><span id="icon" class="fa fa-calendar"></span><br /><input ng-utc-datepicker
data-trigger="icon"
ng-model="vm.date"/></code></pre>
<hr/>
<h3>Datepicker with trigger element and custom format</h3>
<input ng-utc-datepicker data-trigger="btn-text" data-format="MM/DD/YYYY HH:mm:ss" ng-model="vm.date"/>
<button id="btn-text">Show Calendar</button>
<pre><code><input ng-utc-datepicker
data-trigger="btn-text"
data-format="MM/DD/YYYY HH:mm:ss"
ng-model="vm.date"/><br /><button id="btn-text">Show Calendar</button></code></pre>
</section>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script type="text/javascript" src="src/js/ngUtcDatepicker.js"></script>
<script type="text/javascript">
(function (angular) {
'use strict';
var app = angular.module('app', ['es.ngUtcDatepicker']);
angular.module('app')
.controller('ctrl', [function () {
var vm = this;
vm.date = new Date();
}]);
})(window.angular);
</script>
</body>
</html>