index.html
8.9 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196">
<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<title></title>
<link rel="stylesheet" type="text/css" media="screen"
href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href="../css/prettify-1.0.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
<script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Main title -->
<a class="navbar-brand" href=""></a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="..">Usage</a>
</li>
<li >
<a href="../Installing/">Installing</a>
</li>
<li class="active">
<a href="./">Functions</a>
</li>
<li >
<a href="../Options/">Options</a>
</li>
<li >
<a href="../Events/">Events</a>
</li>
<li >
<a href="../Changelog.md">Change Log</a>
</li>
<li >
<a href="../ContributorsGuide/">Dev Guide</a>
</li>
<li >
<a href="../Extras/">Extras</a>
</li>
<li >
<a href="../FAQ/">FAQs</a>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DC5QN&placement=eonasdangithubio" id="_carbonads_js"></script>
<div class="bs-sidebar hidden-print affix well" role="complementary"> <ul class="nav bs-sidenav">
<li class="main active"><a href="#functions">Functions</a></li>
<li><a href="#destroy">destroy()</a></li>
<li><a href="#toggle">toggle()</a></li>
<li><a href="#show">show()</a></li>
<li><a href="#hide">hide()</a></li>
<li><a href="#disable">disable()</a></li>
<li><a href="#enable">enable()</a></li>
<li><a href="#clear">clear()</a></li>
<li><a href="#viewdate">viewDate</a></li>
</ul>
</div></div>
<div class="col-md-8" role="main">
<div class="alert alert-danger" style="font-size:1.5em;">
<strong>Important!</strong>
Please read this <a href="https://eonasdan.com/posts/state-of-my-picker" target="_blank">blog post</a>
</div>
<h2 id="functions">Functions</h2>
<div class="alert alert-info">
<strong>Note</strong>
All functions are accessed via the <code>data</code> attribute e.g. <code>$('#datetimepicker').data("DateTimePicker").FUNCTION()</code>
</div>
<h3 id="destroy">destroy()</h3>
<p>Destroys the widget and removes all attached event listeners</p>
<hr />
<h3 id="toggle">toggle()</h3>
<p>Shows or hides the widget</p>
<h4 id="emits">Emits</h4>
<ul>
<li>
<p><code>dp.hide</code> - if the widget is hidden after the toggle call</p>
</li>
<li>
<p><code>dp.show</code> - if the widget is show after the toggle call</p>
</li>
<li>
<p><code>dp.change</code> - if the widget is opened for the first time and the input element is empty and <code>options.useCurrent != false</code></p>
</li>
</ul>
<hr />
<h3 id="show">show()</h3>
<p>Shows the widget</p>
<h4 id="emits_1">Emits</h4>
<ul>
<li>
<p><code>dp.show</code> - if the widget was hidden before that call</p>
</li>
<li>
<p><code>dp.change</code> - if the widget is opened for the first time and the useCurrent is set to true or to a granularity value and the input element the component is attached to has an empty value</p>
</li>
</ul>
<hr />
<h3 id="hide">hide()</h3>
<p>Hides the widget</p>
<h4 id="emits_2">Emits</h4>
<ul>
<li><code>dp.hide</code> - if the widget was visible before that call</li>
</ul>
<hr />
<h3 id="disable">disable()</h3>
<p>Disables the input element, the component is attached to, by adding a <code>disabled="true"</code> attribute to it. If the widget was visible before that call it is hidden.</p>
<h4 id="emits_3">Emits</h4>
<ul>
<li><code>dp.hide</code> - if the widget was visible before that call</li>
</ul>
<hr />
<h3 id="enable">enable()</h3>
<p>Enables the input element, the component is attached to, by removing <code>disabled</code> attribute from it.</p>
<hr />
<h3 id="clear">clear()</h3>
<p>Clears the datepicker by setting the value to <code>null</code></p>
<h3 id="viewdate">viewDate</h3>
<p><small>4.14.30</small> Issue #872</p>
<h4 id="viewdate_1">viewDate()</h4>
<p>Returns a <code>moment</code> variable with the currently set <code>options.viewDate</code> option.</p>
<h4 id="viewdateviewdate">viewDate(viewDate)</h4>
<p>Takes a <code>string, moment or Date</code> value.</p>
<p>This will change the <code>viewDate</code> without changing or setting the selected date.</p>
</div>
</div>
</div>
<script src="../js/prettify-1.0.min.js"></script>
<script src="../js/base.js"></script>
<script>
if (top != self) {
top.location.replace(self.location.href);
}
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-47462200-1', 'eonasdan.github.io');
ga('send', 'pageview');
</script>
</body>
</html>