index.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
  8. <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
  9. <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
  10. <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
  11. <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
  12. <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
  13. <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
  14. <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
  15. <link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196">
  16. <link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
  17. <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
  18. <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
  19. <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
  20. <meta name="msapplication-TileColor" content="#2b5797">
  21. <meta name="msapplication-TileImage" content="/mstile-144x144.png">
  22. <title></title>
  23. <link rel="stylesheet" type="text/css" media="screen"
  24. href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
  25. <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
  26. <link href="../css/prettify-1.0.css" rel="stylesheet">
  27. <link href="../css/base.css" rel="stylesheet">
  28. <link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
  29. <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  30. <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  31. <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
  32. <script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>
  33. </head>
  34. <body>
  35. <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  36. <div class="container">
  37. <!-- Collapsed navigation -->
  38. <div class="navbar-header">
  39. <!-- Expander button -->
  40. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  41. <span class="sr-only">Toggle navigation</span>
  42. <span class="icon-bar"></span>
  43. <span class="icon-bar"></span>
  44. <span class="icon-bar"></span>
  45. </button>
  46. <!-- Main title -->
  47. <a class="navbar-brand" href=""></a>
  48. </div>
  49. <!-- Expanded navigation -->
  50. <div class="navbar-collapse collapse">
  51. <!-- Main navigation -->
  52. <ul class="nav navbar-nav">
  53. <li >
  54. <a href="..">Usage</a>
  55. </li>
  56. <li >
  57. <a href="../Installing/">Installing</a>
  58. </li>
  59. <li class="active">
  60. <a href="./">Functions</a>
  61. </li>
  62. <li >
  63. <a href="../Options/">Options</a>
  64. </li>
  65. <li >
  66. <a href="../Events/">Events</a>
  67. </li>
  68. <li >
  69. <a href="../Changelog.md">Change Log</a>
  70. </li>
  71. <li >
  72. <a href="../ContributorsGuide/">Dev Guide</a>
  73. </li>
  74. <li >
  75. <a href="../Extras/">Extras</a>
  76. </li>
  77. <li >
  78. <a href="../FAQ/">FAQs</a>
  79. </li>
  80. </ul>
  81. <!-- Search, Navigation and Repo links -->
  82. <ul class="nav navbar-nav navbar-right">
  83. </ul>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="container">
  88. <div class="row">
  89. <div class="col-md-3"><script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DC5QN&placement=eonasdangithubio" id="_carbonads_js"></script>
  90. <div class="bs-sidebar hidden-print affix well" role="complementary"> <ul class="nav bs-sidenav">
  91. <li class="main active"><a href="#functions">Functions</a></li>
  92. <li><a href="#destroy">destroy()</a></li>
  93. <li><a href="#toggle">toggle()</a></li>
  94. <li><a href="#show">show()</a></li>
  95. <li><a href="#hide">hide()</a></li>
  96. <li><a href="#disable">disable()</a></li>
  97. <li><a href="#enable">enable()</a></li>
  98. <li><a href="#clear">clear()</a></li>
  99. <li><a href="#viewdate">viewDate</a></li>
  100. </ul>
  101. </div></div>
  102. <div class="col-md-8" role="main">
  103. <div class="alert alert-danger" style="font-size:1.5em;">
  104. <strong>Important!</strong>
  105. Please read this <a href="https://eonasdan.com/posts/state-of-my-picker" target="_blank">blog post</a>
  106. </div>
  107. <h2 id="functions">Functions</h2>
  108. <div class="alert alert-info">
  109. <strong>Note</strong>
  110. All functions are accessed via the <code>data</code> attribute e.g. <code>$('#datetimepicker').data("DateTimePicker").FUNCTION()</code>
  111. </div>
  112. <h3 id="destroy">destroy()</h3>
  113. <p>Destroys the widget and removes all attached event listeners</p>
  114. <hr />
  115. <h3 id="toggle">toggle()</h3>
  116. <p>Shows or hides the widget</p>
  117. <h4 id="emits">Emits</h4>
  118. <ul>
  119. <li>
  120. <p><code>dp.hide</code> - if the widget is hidden after the toggle call</p>
  121. </li>
  122. <li>
  123. <p><code>dp.show</code> - if the widget is show after the toggle call</p>
  124. </li>
  125. <li>
  126. <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>
  127. </li>
  128. </ul>
  129. <hr />
  130. <h3 id="show">show()</h3>
  131. <p>Shows the widget</p>
  132. <h4 id="emits_1">Emits</h4>
  133. <ul>
  134. <li>
  135. <p><code>dp.show</code> - if the widget was hidden before that call</p>
  136. </li>
  137. <li>
  138. <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>
  139. </li>
  140. </ul>
  141. <hr />
  142. <h3 id="hide">hide()</h3>
  143. <p>Hides the widget</p>
  144. <h4 id="emits_2">Emits</h4>
  145. <ul>
  146. <li><code>dp.hide</code> - if the widget was visible before that call</li>
  147. </ul>
  148. <hr />
  149. <h3 id="disable">disable()</h3>
  150. <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>
  151. <h4 id="emits_3">Emits</h4>
  152. <ul>
  153. <li><code>dp.hide</code> - if the widget was visible before that call</li>
  154. </ul>
  155. <hr />
  156. <h3 id="enable">enable()</h3>
  157. <p>Enables the input element, the component is attached to, by removing <code>disabled</code> attribute from it.</p>
  158. <hr />
  159. <h3 id="clear">clear()</h3>
  160. <p>Clears the datepicker by setting the value to <code>null</code></p>
  161. <h3 id="viewdate">viewDate</h3>
  162. <p><small>4.14.30</small> Issue #872</p>
  163. <h4 id="viewdate_1">viewDate()</h4>
  164. <p>Returns a <code>moment</code> variable with the currently set <code>options.viewDate</code> option.</p>
  165. <h4 id="viewdateviewdate">viewDate(viewDate)</h4>
  166. <p>Takes a <code>string, moment or Date</code> value.</p>
  167. <p>This will change the <code>viewDate</code> without changing or setting the selected date.</p>
  168. </div>
  169. </div>
  170. </div>
  171. <script src="../js/prettify-1.0.min.js"></script>
  172. <script src="../js/base.js"></script>
  173. <script>
  174. if (top != self) {
  175. top.location.replace(self.location.href);
  176. }
  177. (function (i, s, o, g, r, a, m) {
  178. i['GoogleAnalyticsObject'] = r;
  179. i[r] = i[r] || function () {
  180. (i[r].q = i[r].q || []).push(arguments)
  181. }, i[r].l = 1 * new Date();
  182. a = s.createElement(o),
  183. m = s.getElementsByTagName(o)[0];
  184. a.async = 1;
  185. a.src = g;
  186. m.parentNode.insertBefore(a, m)
  187. })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
  188. ga('create', 'UA-47462200-1', 'eonasdan.github.io');
  189. ga('send', 'pageview');
  190. </script>
  191. </body>
  192. </html>