-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.vue
133 lines (117 loc) · 2.27 KB
/
App.vue
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
<template>
<section>
<h2 class="page-header">
<a id="examples" class="tgt">Examples</a>
</h2>
<article class="row">
<div class="col-md-4">
<h3>
<a id="basics" class="tgt">The Basics</a>
</h3>
<p>DateRangePicker can take a regular input element like this:</p>
<p>
<input class="raw">
</p>
<p>and turn it into:</p>
<p>
<date-picker :options="{inline_picker:true, startDate:start, finalDate:final, showMonthAfterYear:false, changeMonth: true, changeYear:true,
minDate:minimal, hideIfNoPrevNext:true, stepMonths:1, showWeek:true, showOtherMonths:true, selectOtherMonths:true}"></date-picker>
</p>
</div>
<div class="col-md-8">
<h3>Example Code</h3>
<pre>
<code class="html">
<date-picker v-bind:options="{inline_picker:true, startDate:start, finalDate:final, showMonthAfterYear:true, changeMonth:true, changeYear:true, minDate:minimal, hideIfNoPrevNext:true, stepMonths:1, showWeek:true, showOtherMonths:true, selectOtherMonths:true}"></date-picker>
<script>
export default
{
name: 'app',
data ()
{
return {start:null,final:null, minimal:null};
},
created ()
{
var ds = new Date(), df = new Date(), md = new Date();
ds.setFullYear(2016,10,5);
df.setFullYear(2016,11,20);
md.setFullYear(2016,10,20);
this.start = ds;
this.final = df;
this.minimal = md;
},
methods:
{
}
}
</script>
</code>
</pre>
</div>
</article>
</section>
</template>
<script>
export default
{
name: 'app',
data ()
{
return {start:null,final:null, minimal:null};
},
created ()
{
var ds = new Date(), df = new Date(), md = new Date();
ds.setFullYear(2016,10,5);
df.setFullYear(2016,11,20);
md.setFullYear(2016,10,20);
this.start = ds;
this.final = df;
this.minimal = md;
},
methods:
{
}
}
</script>
<style>
section
{
padding-top: 30px;
padding-bottom: 30px;
margin-left: 30px;
margin-right: 30px;
}
.tgt
{
padding-top: 70px;
color: inherit;
}
.tgt:hover
{
color: inherit;
text-decoration: none;
}
a:focus
{
outline: 0;
}
.btn
{
padding: 4px 12px;
}
article + article
{
border-top: 1px solid #eee;
}
article
{
margin-bottom: 10px;
}
input.raw
{
width: 255px;
padding: 4px 6px;
}
</style>