index.html
2.26 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!doctype html>
<!--
@license
Copyright (c) 2015 Abdón Rodríguez Davila (@abdonrd). All rights reserved.
This code may only be used under the MIT license.
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>momentjs-element demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
<link rel="import" href="../moment-element.html">
<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 550px;
}
moment-element {
display: block;
}
</style>
</head>
<body unresolved>
<div class="vertical-section-container centered">
<h3>Current date and date from string (ISO 8601 and another)</h3>
<demo-snippet>
<template>
<moment-element></moment-element>
<moment-element datetime="1991-12-31"></moment-element>
<moment-element datetime="12-31-1991" input-format="MM-DD-YYYY"></moment-element>
</template>
</demo-snippet>
<h3>Date from string + format</h3>
<demo-snippet>
<template>
<moment-element datetime="1991-12-31" output-format="l"></moment-element>
<moment-element datetime="12-31-1991" input-format="MM-DD-YYYY" output-format="l"></moment-element>
<moment-element datetime="1991-12-31" output-format="MMM DD[,] YYYY"></moment-element>
</template>
</demo-snippet>
<h3>Date from now or from custom date</h3>
<demo-snippet>
<template>
<moment-element datetime="1991-12-31" from="now"></moment-element>
<moment-element datetime="1991-12-31" from="2003-06-23"></moment-element>
</template>
</demo-snippet>
<h3>Date to now or to custom date</h3>
<demo-snippet>
<template>
<moment-element datetime="1991-12-31" to="now"></moment-element>
<moment-element datetime="1991-12-31" to="2003-06-23"></moment-element>
</template>
</demo-snippet>
</div>
</body>
</html>