adminlte_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (324) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.travis.yml +5 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +51 -0
  8. data/Rakefile +10 -0
  9. data/adminlte_rails.gemspec +27 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/lib/adminlte_rails.rb +5 -0
  13. data/lib/adminlte_rails/engine.rb +7 -0
  14. data/lib/adminlte_rails/version.rb +3 -0
  15. data/vendor/assets/javascripts/adminlte.js +3 -0
  16. data/vendor/assets/javascripts/adminlte.min.js +3 -0
  17. data/vendor/assets/javascripts/adminlte/adminlte.js +1129 -0
  18. data/vendor/assets/javascripts/adminlte/adminlte.min.js +14 -0
  19. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-colorpicker/bootstrap-colorpicker.js +1319 -0
  20. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-colorpicker/bootstrap-colorpicker.min.js +5 -0
  21. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker.js +2030 -0
  22. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js +8 -0
  23. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-daterangepicker/bootstrap-daterangepicker.js +1653 -0
  24. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-slider/bootstrap-slider.js +427 -0
  25. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-timepicker/bootstrap-timepicker.js +1177 -0
  26. data/vendor/assets/javascripts/adminlte/plugins/bootstrap/bootstrap.js +2377 -0
  27. data/vendor/assets/javascripts/adminlte/plugins/bootstrap/bootstrap.min.js +7 -0
  28. data/vendor/assets/javascripts/adminlte/plugins/jquery/jquery.js +10364 -0
  29. data/vendor/assets/javascripts/adminlte/plugins/jquery/jquery.min.js +2 -0
  30. data/vendor/assets/javascripts/adminlte/plugins/select2/.bower.json +24 -0
  31. data/vendor/assets/javascripts/adminlte/plugins/select2/.editorconfig +6 -0
  32. data/vendor/assets/javascripts/adminlte/plugins/select2/.github/CONTRIBUTING.md +203 -0
  33. data/vendor/assets/javascripts/adminlte/plugins/select2/.github/ISSUE_TEMPLATE.md +20 -0
  34. data/vendor/assets/javascripts/adminlte/plugins/select2/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  35. data/vendor/assets/javascripts/adminlte/plugins/select2/.gitignore +3 -0
  36. data/vendor/assets/javascripts/adminlte/plugins/select2/.jshintignore +4 -0
  37. data/vendor/assets/javascripts/adminlte/plugins/select2/.jshintrc +25 -0
  38. data/vendor/assets/javascripts/adminlte/plugins/select2/.travis.yml +22 -0
  39. data/vendor/assets/javascripts/adminlte/plugins/select2/CHANGELOG.md +272 -0
  40. data/vendor/assets/javascripts/adminlte/plugins/select2/Gruntfile.js +380 -0
  41. data/vendor/assets/javascripts/adminlte/plugins/select2/LICENSE.md +21 -0
  42. data/vendor/assets/javascripts/adminlte/plugins/select2/README.md +123 -0
  43. data/vendor/assets/javascripts/adminlte/plugins/select2/bower.json +13 -0
  44. data/vendor/assets/javascripts/adminlte/plugins/select2/component.json +19 -0
  45. data/vendor/assets/javascripts/adminlte/plugins/select2/composer.json +25 -0
  46. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/css/select2.css +484 -0
  47. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/css/select2.min.css +1 -0
  48. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/af.js +3 -0
  49. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ar.js +3 -0
  50. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/az.js +3 -0
  51. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/bg.js +3 -0
  52. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/bs.js +3 -0
  53. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ca.js +3 -0
  54. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/cs.js +3 -0
  55. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/da.js +3 -0
  56. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/de.js +3 -0
  57. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/dsb.js +3 -0
  58. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/el.js +3 -0
  59. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/en.js +3 -0
  60. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/es.js +3 -0
  61. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/et.js +3 -0
  62. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/eu.js +3 -0
  63. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/fa.js +3 -0
  64. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/fi.js +3 -0
  65. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/fr.js +3 -0
  66. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/gl.js +3 -0
  67. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/he.js +3 -0
  68. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/hi.js +3 -0
  69. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/hr.js +3 -0
  70. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/hsb.js +3 -0
  71. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/hu.js +3 -0
  72. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/hy.js +3 -0
  73. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/id.js +3 -0
  74. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/is.js +3 -0
  75. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/it.js +3 -0
  76. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ja.js +3 -0
  77. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/km.js +3 -0
  78. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ko.js +3 -0
  79. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/lt.js +3 -0
  80. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/lv.js +3 -0
  81. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/mk.js +3 -0
  82. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ms.js +3 -0
  83. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/nb.js +3 -0
  84. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/nl.js +3 -0
  85. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/pl.js +3 -0
  86. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ps.js +3 -0
  87. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/pt-BR.js +3 -0
  88. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/pt.js +3 -0
  89. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ro.js +3 -0
  90. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/ru.js +3 -0
  91. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/sk.js +3 -0
  92. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/sl.js +3 -0
  93. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/sr-Cyrl.js +3 -0
  94. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/sr.js +3 -0
  95. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/sv.js +3 -0
  96. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/th.js +3 -0
  97. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/tr.js +3 -0
  98. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/uk.js +3 -0
  99. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/vi.js +3 -0
  100. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/zh-CN.js +3 -0
  101. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/i18n/zh-TW.js +3 -0
  102. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/select2.full.js +6457 -0
  103. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/select2.full.min.js +1 -0
  104. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/select2.js +5746 -0
  105. data/vendor/assets/javascripts/adminlte/plugins/select2/dist/js/select2.min.js +1 -0
  106. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/README.md +1 -0
  107. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/announcements-4.0.html +12 -0
  108. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/community.html +12 -0
  109. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/examples.html +12 -0
  110. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/index.html +12 -0
  111. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/options-old.html +12 -0
  112. data/vendor/assets/javascripts/adminlte/plugins/select2/docs/options.html +12 -0
  113. data/vendor/assets/javascripts/adminlte/plugins/select2/package.json +73 -0
  114. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.jquery.json +32 -0
  115. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/banner.end.js +6 -0
  116. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/banner.start.js +6 -0
  117. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/jquery.mousewheel.shim.js +6 -0
  118. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/jquery.select2.js +57 -0
  119. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/jquery.shim.js +14 -0
  120. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/containerCss.js +56 -0
  121. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/dropdownCss.js +56 -0
  122. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/initSelection.js +42 -0
  123. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/inputData.js +127 -0
  124. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/matcher.js +42 -0
  125. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/query.js +26 -0
  126. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/compat/utils.js +43 -0
  127. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/core.js +612 -0
  128. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/ajax.js +109 -0
  129. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/array.js +79 -0
  130. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/base.js +40 -0
  131. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/maximumInputLength.js +31 -0
  132. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/maximumSelectionLength.js +31 -0
  133. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/minimumInputLength.js +30 -0
  134. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/select.js +285 -0
  135. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/tags.js +128 -0
  136. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/data/tokenizer.js +116 -0
  137. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/defaults.js +396 -0
  138. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/diacritics.js +847 -0
  139. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown.js +42 -0
  140. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/attachBody.js +222 -0
  141. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/attachContainer.js +18 -0
  142. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/closeOnSelect.js +35 -0
  143. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/hidePlaceholder.js +42 -0
  144. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/infiniteScroll.js +89 -0
  145. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/minimumResultsForSearch.js +39 -0
  146. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/search.js +101 -0
  147. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/selectOnClose.js +50 -0
  148. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/dropdown/stopPropagation.js +38 -0
  149. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/af.js +44 -0
  150. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ar.js +30 -0
  151. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/az.js +27 -0
  152. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/bg.js +47 -0
  153. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/bs.js +55 -0
  154. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ca.js +52 -0
  155. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/cs.js +61 -0
  156. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/da.js +36 -0
  157. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/de.js +40 -0
  158. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/dsb.js +48 -0
  159. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/el.js +52 -0
  160. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/en.js +44 -0
  161. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/es.js +52 -0
  162. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/et.js +53 -0
  163. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/eu.js +51 -0
  164. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/fa.js +38 -0
  165. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/fi.js +30 -0
  166. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/fr.js +33 -0
  167. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/gl.js +39 -0
  168. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/he.js +56 -0
  169. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/hi.js +39 -0
  170. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/hr.js +44 -0
  171. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/hsb.js +48 -0
  172. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/hu.js +30 -0
  173. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/hy.js +38 -0
  174. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/id.js +30 -0
  175. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/is.js +41 -0
  176. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/it.js +48 -0
  177. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ja.js +36 -0
  178. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/km.js +36 -0
  179. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ko.js +36 -0
  180. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/lt.js +52 -0
  181. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/lv.js +51 -0
  182. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/mk.js +47 -0
  183. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ms.js +30 -0
  184. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/nb.js +32 -0
  185. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/nl.js +43 -0
  186. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/pl.js +45 -0
  187. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ps.js +45 -0
  188. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/pt-BR.js +46 -0
  189. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/pt.js +40 -0
  190. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ro.js +46 -0
  191. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/ru.js +58 -0
  192. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/sk.js +59 -0
  193. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/sl.js +54 -0
  194. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/sr-Cyrl.js +55 -0
  195. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/sr.js +55 -0
  196. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/sv.js +37 -0
  197. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/th.js +36 -0
  198. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/tr.js +36 -0
  199. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/uk.js +43 -0
  200. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/vi.js +37 -0
  201. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/zh-CN.js +36 -0
  202. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/i18n/zh-TW.js +33 -0
  203. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/keys.js +25 -0
  204. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/options.js +122 -0
  205. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/results.js +523 -0
  206. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/allowClear.js +97 -0
  207. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/base.js +158 -0
  208. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/clickMask.js +29 -0
  209. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/eventRelay.js +45 -0
  210. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/multiple.js +109 -0
  211. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/placeholder.js +49 -0
  212. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/search.js +222 -0
  213. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/single.js +99 -0
  214. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/selection/stopPropagation.js +38 -0
  215. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/translation.js +36 -0
  216. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/select2/utils.js +276 -0
  217. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/wrapper.end.js +12 -0
  218. data/vendor/assets/javascripts/adminlte/plugins/select2/src/js/wrapper.start.js +38 -0
  219. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/_dropdown.scss +73 -0
  220. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/_multiple.scss +35 -0
  221. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/_single.scss +34 -0
  222. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/core.scss +48 -0
  223. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/mixins/_gradients.scss +13 -0
  224. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/classic/_defaults.scss +34 -0
  225. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/classic/_multiple.scss +93 -0
  226. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/classic/_single.scss +124 -0
  227. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/classic/layout.scss +64 -0
  228. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/default/_multiple.scss +98 -0
  229. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/default/_single.scss +83 -0
  230. data/vendor/assets/javascripts/adminlte/plugins/select2/src/scss/theme/default/layout.scss +97 -0
  231. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/a11y/search-tests.js +51 -0
  232. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/a11y/selection-tests.js +154 -0
  233. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/array-tests.js +318 -0
  234. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/base-tests.js +29 -0
  235. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/inputData-tests.js +158 -0
  236. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/maximumInputLength-tests.js +138 -0
  237. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/maximumSelectionLength-tests.js +202 -0
  238. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/minimumInputLength-tests.js +138 -0
  239. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/select-tests.js +489 -0
  240. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/tags-tests.js +276 -0
  241. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/data/tokenizer-tests.js +219 -0
  242. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/dropdown/dropdownCss-tests.js +104 -0
  243. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/dropdown/positioning-tests.js +177 -0
  244. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/dropdown/selectOnClose-tests.js +137 -0
  245. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/dropdown/stopPropagation-tests.js +33 -0
  246. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/helpers.js +46 -0
  247. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/integration.html +21 -0
  248. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/integration/dom-changes.js +257 -0
  249. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/integration/jquery-calls.js +30 -0
  250. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/integration/select2-methods.js +139 -0
  251. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/options/ajax-tests.js +32 -0
  252. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/options/data-tests.js +44 -0
  253. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/options/deprecated-tests.js +250 -0
  254. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/options/translation-tests.js +28 -0
  255. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/options/width-tests.js +66 -0
  256. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/results/focusing-tests.js +138 -0
  257. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/allowClear-tests.js +218 -0
  258. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/containerCss-tests.js +104 -0
  259. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/multiple-tests.js +149 -0
  260. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/placeholder-tests.js +74 -0
  261. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/search-tests.js +191 -0
  262. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/single-tests.js +117 -0
  263. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/selection/stopPropagation-tests.js +33 -0
  264. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/unit.html +95 -0
  265. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/utils/decorator-tests.js +189 -0
  266. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/utils/escapeMarkup-tests.js +36 -0
  267. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/vendor/jquery-1.7.2.js +9404 -0
  268. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/vendor/qunit-1.23.1.css +305 -0
  269. data/vendor/assets/javascripts/adminlte/plugins/select2/tests/vendor/qunit-1.23.1.js +4334 -0
  270. data/vendor/assets/javascripts/adminlte/plugins/select2/vendor/jquery-2.1.0.js +9111 -0
  271. data/vendor/assets/stylesheets/adminlte.min.scss +27 -0
  272. data/vendor/assets/stylesheets/adminlte.scss +6 -0
  273. data/vendor/assets/stylesheets/adminlte/adminlte.css +4977 -0
  274. data/vendor/assets/stylesheets/adminlte/adminlte.min.css +7 -0
  275. data/vendor/assets/stylesheets/adminlte/fonts/FontAwesome.otf +0 -0
  276. data/vendor/assets/stylesheets/adminlte/fonts/fontawesome-webfont.eot +0 -0
  277. data/vendor/assets/stylesheets/adminlte/fonts/fontawesome-webfont.svg +2671 -0
  278. data/vendor/assets/stylesheets/adminlte/fonts/fontawesome-webfont.ttf +0 -0
  279. data/vendor/assets/stylesheets/adminlte/fonts/fontawesome-webfont.woff +0 -0
  280. data/vendor/assets/stylesheets/adminlte/fonts/fontawesome-webfont.woff2 +0 -0
  281. data/vendor/assets/stylesheets/adminlte/fonts/glyphicons-halflings-regular.eot +0 -0
  282. data/vendor/assets/stylesheets/adminlte/fonts/glyphicons-halflings-regular.svg +288 -0
  283. data/vendor/assets/stylesheets/adminlte/fonts/glyphicons-halflings-regular.ttf +0 -0
  284. data/vendor/assets/stylesheets/adminlte/fonts/glyphicons-halflings-regular.woff +0 -0
  285. data/vendor/assets/stylesheets/adminlte/fonts/glyphicons-halflings-regular.woff2 +0 -0
  286. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-colorpicker/bootstrap-colorpicker.css +230 -0
  287. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker.css +477 -0
  288. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker.standalone.css +510 -0
  289. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker3.css +684 -0
  290. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-datepicker/bootstrap-datepicker3.standalone.css +713 -0
  291. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-daterangepicker/bootstrap-daterangepicker.css +269 -0
  292. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-slider/bootstrap-slider.css +178 -0
  293. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-timepicker/bootstrap-timepicker.less +172 -0
  294. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap/bootstrap.css.map +1 -0
  295. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap/bootstrap.scss +6757 -0
  296. data/vendor/assets/stylesheets/adminlte/plugins/font-awesome/font-awesome.scss +2341 -0
  297. data/vendor/assets/stylesheets/adminlte/plugins/select2/select2.css +484 -0
  298. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.css +1781 -0
  299. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.min.css +1 -0
  300. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.css +171 -0
  301. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.min.css +1 -0
  302. data/vendor/assets/stylesheets/adminlte/skins/skin-black.css +161 -0
  303. data/vendor/assets/stylesheets/adminlte/skins/skin-black.min.css +1 -0
  304. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.css +163 -0
  305. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.min.css +1 -0
  306. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.css +142 -0
  307. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.min.css +1 -0
  308. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.css +152 -0
  309. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.min.css +1 -0
  310. data/vendor/assets/stylesheets/adminlte/skins/skin-green.css +134 -0
  311. data/vendor/assets/stylesheets/adminlte/skins/skin-green.min.css +1 -0
  312. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.css +152 -0
  313. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.min.css +1 -0
  314. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.css +134 -0
  315. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.min.css +1 -0
  316. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.css +152 -0
  317. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.min.css +1 -0
  318. data/vendor/assets/stylesheets/adminlte/skins/skin-red.css +134 -0
  319. data/vendor/assets/stylesheets/adminlte/skins/skin-red.min.css +1 -0
  320. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.css +152 -0
  321. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.min.css +1 -0
  322. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.css +134 -0
  323. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.min.css +1 -0
  324. metadata +408 -0
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * Datepicker for Bootstrap v1.7.1 (https://github.com/uxsolutions/bootstrap-datepicker)
3
+ *
4
+ * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
5
+ */
6
+
7
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(c,d){return function(){return d!==b&&a.fn.datepicker.deprecated(d),this[c].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split("-")[0],q[b])){var d=q[b];return a.each(p,function(a,b){b in d&&(c[b]=d[b])}),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(0<=this[c].valueOf()-b&&this[c].valueOf()-b<864e5)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new j;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),k=function(b,c){a.data(b,"datepicker",this),this._process_options(c),this.dates=new j,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=a(r.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(a,b){return Number(b)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};k.prototype={constructor:k,_resolveViewName:function(b){return a.each(r.viewModes,function(c,d){if(b===c||a.inArray(b,d.names)!==-1)return b=c,!1}),b},_resolveDaysOfWeek:function(b){return a.isArray(b)||(b=b.split(/[,\s]*/)),a.map(b,Number)},_check_template:function(c){try{if(c===b||""===c)return!1;if((c.match(/[<>]/g)||[]).length<=0)return!0;var d=a(c);return d.length>0}catch(a){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split("-")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);e.startDate!==-(1/0)&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-(1/0)),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=this._resolveDaysOfWeek(e.daysOfWeekDisabled||[]),e.daysOfWeekHighlighted=this._resolveDaysOfWeek(e.daysOfWeekHighlighted||[]),e.datesDisabled=e.datesDisabled||[],a.isArray(e.datesDisabled)||(e.datesDisabled=e.datesDisabled.split(",")),e.datesDisabled=a.map(e.datesDisabled,function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)});var h=String(e.orientation).toLowerCase().split(/\s+/g),i=e.orientation.toLowerCase();if(h=a.grep(h,function(a){return/^auto|left|right|top|bottom$/.test(a)}),e.orientation={x:"auto",y:"auto"},i&&"auto"!==i)if(1===h.length)switch(h[0]){case"top":case"bottom":e.orientation.y=h[0];break;case"left":case"right":e.orientation.x=h[0]}else i=a.grep(h,function(a){return/^left|right$/.test(a)}),e.orientation.x=i[0]||"auto",i=a.grep(h,function(a){return/^top|bottom$/.test(a)}),e.orientation.y=i[0]||"auto";else;if(e.defaultViewDate instanceof Date||"string"==typeof e.defaultViewDate)e.defaultViewDate=r.parseDate(e.defaultViewDate,g,e.language,e.assumeNearbyYear);else if(e.defaultViewDate){var j=e.defaultViewDate.year||(new Date).getFullYear(),k=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=c(j,k,l)}else e.defaultViewDate=d()},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){var b={keyup:a.proxy(function(b){a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:a.proxy(this.keydown,this),paste:a.proxy(this.paste,this)};this.o.showOnFocus===!0&&(b.focus=a.proxy(this.show,this)),this.isInput?this._events=[[this.element,b]]:this.component&&this.inputField.length?this._events=[[this.inputField,b],[this.component,{click:a.proxy(this.show,this)}]]:this._events=[[this.element,{click:a.proxy(this.show,this),keydown:a.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":a.proxy(function(a){this.update(a.date)},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[this.picker,".prev, .next",{click:a.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:a.proxy(this.dayCellClick,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,viewMode:this.viewMode,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return r.formatDate(c,b,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&this.o.enableOnReadonly===!1))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&a(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(b){var c;if(b.originalEvent.clipboardData&&b.originalEvent.clipboardData.types&&a.inArray("text/plain",b.originalEvent.clipboardData.types)!==-1)c=b.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;c=window.clipboardData.getData("Text")}this.setDate(c),this.update(),b.preventDefault()},_utc_to_local:function(a){if(!a)return a;var b=new Date(a.getTime()+6e4*a.getTimezoneOffset());return b.getTimezoneOffset()!==a.getTimezoneOffset()&&(b=new Date(a.getTime()+6e4*b.getTimezoneOffset())),b},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&c(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate())},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var a=this.dates.get(-1);return a!==b?new Date(a):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,b),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,a.map(b,this._utc_to_local)),this},setDate:f("setDates"),setUTCDate:f("setUTCDates"),remove:f("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var a=this.getFormattedDate();return this.inputField.val(a),this},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language;return a.map(this.dates,function(a){return r.formatDate(a,c,d)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(a){return this._process_options({startDate:a}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(a){return this._process_options({endDate:a}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(a){return this._process_options({daysOfWeekDisabled:a}),this.update(),this},setDaysOfWeekHighlighted:function(a){return this._process_options({daysOfWeekHighlighted:a}),this.update(),this},setDatesDisabled:function(a){return this._process_options({datesDisabled:a}),this.update(),this},place:function(){if(this.isInline)return this;var b=this.picker.outerWidth(),c=this.picker.outerHeight(),d=10,e=a(this.o.container),f=e.width(),g="body"===this.o.container?a(document).scrollTop():e.scrollTop(),h=e.offset(),i=[0];this.element.parents().each(function(){var b=a(this).css("z-index");"auto"!==b&&0!==Number(b)&&i.push(Number(b))});var j=Math.max.apply(Math,i)+this.o.zIndexOffset,k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left-h.left,o=k.top-h.top;"body"!==this.o.container&&(o+=g),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=b-m)):k.left<0?(this.picker.addClass("datepicker-orient-left"),n-=k.left-d):n+b>f?(this.picker.addClass("datepicker-orient-right"),n+=m-b):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p,q=this.o.orientation.y;if("auto"===q&&(p=-g+o-c,q=p<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+q),"top"===q?o-=c+parseInt(this.picker.css("padding-top")):o+=l,this.o.rtl){var r=f-(n+m);this.picker.css({top:o,right:r,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),c=a.grep(c,a.proxy(function(a){return!this.dateWithinRange(a)||!a},this),!0),this.dates.replace(c),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),d?(this.setValue(),this.element.change()):this.dates.length&&String(b)!==String(this.dates)&&d&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&b.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var b=this.o.weekStart,c="<tr>";for(this.o.calendarWeeks&&(c+='<th class="cw">&#160;</th>');b<this.o.weekStart+7;)c+='<th class="dow',a.inArray(b,this.o.daysOfWeekDisabled)!==-1&&(c+=" disabled"),c+='">'+q[this.o.language].daysMin[b++%7]+"</th>";c+="</tr>",this.picker.find(".datepicker-days thead").append(c)}},fillMonths:function(){for(var a,b=this._utc_to_local(this.viewDate),c="",d=0;d<12;d++)a=b&&b.getMonth()===d?" focused":"",c+='<span class="month'+a+'">'+q[this.o.language].monthsShort[d]+"</span>";this.picker.find(".datepicker-months td").html(c)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],f=this.viewDate.getUTCFullYear(),g=this.viewDate.getUTCMonth(),h=d();return b.getUTCFullYear()<f||b.getUTCFullYear()===f&&b.getUTCMonth()<g?c.push("old"):(b.getUTCFullYear()>f||b.getUTCFullYear()===f&&b.getUTCMonth()>g)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&e(b,h)&&c.push("today"),this.dates.contains(b)!==-1&&c.push("active"),this.dateWithinRange(b)||c.push("disabled"),this.dateIsDisabled(b)&&c.push("disabled","disabled-date"),a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1&&c.push("highlighted"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),a.inArray(b.valueOf(),this.range)!==-1&&c.push("selected"),b.valueOf()===this.range[0]&&c.push("range-start"),b.valueOf()===this.range[this.range.length-1]&&c.push("range-end")),c},_fill_yearsView:function(c,d,e,f,g,h,i){for(var j,k,l,m="",n=e/10,o=this.picker.find(c),p=Math.floor(f/e)*e,q=p+9*n,r=Math.floor(this.viewDate.getFullYear()/n)*n,s=a.map(this.dates,function(a){return Math.floor(a.getUTCFullYear()/n)*n}),t=p-n;t<=q+n;t+=n)j=[d],k=null,t===p-n?j.push("old"):t===q+n&&j.push("new"),a.inArray(t,s)!==-1&&j.push("active"),(t<g||t>h)&&j.push("disabled"),t===r&&j.push("focused"),i!==a.noop&&(l=i(new Date(t,0,1)),l===b?l={}:"boolean"==typeof l?l={enabled:l}:"string"==typeof l&&(l={classes:l}),l.enabled===!1&&j.push("disabled"),l.classes&&(j=j.concat(l.classes.split(/\s+/))),l.tooltip&&(k=l.tooltip)),m+='<span class="'+j.join(" ")+'"'+(k?' title="'+k+'"':"")+">"+t+"</span>";o.find(".datepicker-switch").text(p+"-"+q),o.find("td").html(m)},fill:function(){var d,e,f=new Date(this.viewDate),g=f.getUTCFullYear(),h=f.getUTCMonth(),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),j=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=q[this.o.language].today||q.en.today||"",n=q[this.o.language].clear||q.en.clear||"",o=q[this.o.language].titleFormat||q.en.titleFormat;if(!isNaN(g)&&!isNaN(h)){this.picker.find(".datepicker-days .datepicker-switch").text(r.formatDate(f,o,this.o.language)),this.picker.find("tfoot .today").text(m).css("display",this.o.todayBtn===!0||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(n).css("display",this.o.clearBtn===!0?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var p=c(g,h,0),s=p.getUTCDate();p.setUTCDate(s-(p.getUTCDay()-this.o.weekStart+7)%7);var t=new Date(p);p.getUTCFullYear()<100&&t.setUTCFullYear(p.getUTCFullYear()),t.setUTCDate(t.getUTCDate()+42),t=t.valueOf();for(var u,v,w=[];p.valueOf()<t;){if(u=p.getUTCDay(),u===this.o.weekStart&&(w.push("<tr>"),this.o.calendarWeeks)){var x=new Date(+p+(this.o.weekStart-u-7)%7*864e5),y=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),z=new Date(Number(z=c(y.getUTCFullYear(),0,1))+(11-z.getUTCDay())%7*864e5),A=(y-z)/864e5/7+1;w.push('<td class="cw">'+A+"</td>")}v=this.getClassNames(p),v.push("day");var B=p.getUTCDate();this.o.beforeShowDay!==a.noop&&(e=this.o.beforeShowDay(this._utc_to_local(p)),e===b?e={}:"boolean"==typeof e?e={enabled:e}:"string"==typeof e&&(e={classes:e}),e.enabled===!1&&v.push("disabled"),e.classes&&(v=v.concat(e.classes.split(/\s+/))),e.tooltip&&(d=e.tooltip),e.content&&(B=e.content)),v=a.isFunction(a.uniqueSort)?a.uniqueSort(v):a.unique(v),w.push('<td class="'+v.join(" ")+'"'+(d?' title="'+d+'"':"")+' data-date="'+p.getTime().toString()+'">'+B+"</td>"),d=null,u===this.o.weekEnd&&w.push("</tr>"),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var C=q[this.o.language].monthsTitle||q.en.monthsTitle||"Months",D=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?C:g).end().find("tbody span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===g&&D.eq(b.getUTCMonth()).addClass("active")}),(g<i||g>k)&&D.addClass("disabled"),g===i&&D.slice(0,j).addClass("disabled"),g===k&&D.slice(l+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var E=this;a.each(D,function(c,d){var e=new Date(g,c,1),f=E.o.beforeShowMonth(e);f===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),f.enabled!==!1||a(d).hasClass("disabled")||a(d).addClass("disabled"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop("title",f.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,g,i,k,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,g,i,k,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,g,i,k,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a,b,c=new Date(this.viewDate),d=c.getUTCFullYear(),e=c.getUTCMonth(),f=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),g=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,j=1;switch(this.viewMode){case 0:a=d<=f&&e<=g,b=d>=h&&e>=i;break;case 4:j*=10;case 3:j*=10;case 2:j*=10;case 1:a=Math.floor(d/j)*j<=f,b=Math.floor(d/j)*j+j>=h}this.picker.find(".prev").toggleClass("disabled",a),this.picker.find(".next").toggleClass("disabled",b)}},click:function(b){b.preventDefault(),b.stopPropagation();var e,f,g,h;e=a(b.target),e.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),e.hasClass("today")&&!e.hasClass("day")&&(this.setViewMode(0),this._setDate(d(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("month")||e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),f=1,1===this.viewMode?(h=e.parent().find("span").index(e),g=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(h)):(h=0,g=Number(e.text()),this.viewDate.setUTCFullYear(g)),this._trigger(r.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(c(g,h,f)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(b){var c=a(b.currentTarget),d=c.data("date"),e=new Date(d);this.o.updateViewDate&&(e.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),e.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(e)},navArrowsClick:function(b){var c=a(b.currentTarget),d=c.hasClass("prev")?-1:1;0!==this.viewMode&&(d*=12*r.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,d),this._trigger(r.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),b!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),(!b&&this.o.updateViewDate||"view"===b)&&(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||b&&"date"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=b===-1?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),c=(c+12)%12;else{for(var j=0;j<i;j++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e},moveYear:function(a,b){return this.moveMonth(a,12*b)},moveAvailableDate:function(a,b,c){do{if(a=this[c](a,b),!this.dateWithinRange(a))return!1;c="moveDay"}while(this.dateIsDisabled(a));return a},weekOfDateIsDisabled:function(b){return a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled)!==-1},dateIsDisabled:function(b){return this.weekOfDateIsDisabled(b)||a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void(40!==a.keyCode&&27!==a.keyCode||(this.show(),a.stopPropagation()));var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,"moveYear"),c&&this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveAvailableDate(e,b,"moveMonth"),c&&this._trigger("changeMonth",this.viewDate)):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,"moveDay"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,"moveWeek")):1===this.viewMode?(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveMonth")):2===this.viewMode&&(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveYear")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}d&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(a){this.viewMode=a,this.picker.children("div").hide().filter(".datepicker-"+r.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var l=function(b,c){a.data(b,"datepicker",this),this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,this.keepEmptyValues=c.keepEmptyValues,delete c.keepEmptyValues,n.call(a(this.inputs),c).on("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a.data(b,"datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(c){if(!this.updating){this.updating=!0;var d=a.data(c.target,"datepicker");if(d!==b){var e=d.getUTCDate(),f=this.keepEmptyValues,g=a.inArray(c.target,this.inputs),h=g-1,i=g+1,j=this.inputs.length;if(g!==-1){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b!==d&&f||b.setUTCDate(e)}),e<this.dates[h])for(;h>=0&&e<this.dates[h];)this.pickers[h--].setUTCDate(e);else if(e>this.dates[i])for(;i<j&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates(),delete this.updating}}}},destroy:function(){a.map(this.pickers,function(a){a.destroy()}),a(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:f("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments);d.shift();var e;if(this.each(function(){var b=a(this),f=b.data("datepicker"),g="object"==typeof c&&c;if(!f){var j=h(this,"date"),m=a.extend({},o,j,g),n=i(m.language),p=a.extend({},o,n,j,g);b.hasClass("input-daterange")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find("input").toArray()}),f=new l(this,p)):f=new k(this,p),b.data("datepicker",f)}"string"==typeof c&&"function"==typeof f[c]&&(e=f[c].apply(f,d))}),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+c+" function)");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},p=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},r={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(a){if("function"==typeof a.toValue&&"function"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(c,e,f,g){function h(a,b){return b===!0&&(b=10),a<100&&(a+=2e3,a>(new Date).getFullYear()+b&&(a-=100)),a}function i(){var a=this.slice(0,j[n].length),b=j[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!c)return b;if(c instanceof Date)return c;if("string"==typeof e&&(e=r.parseFormat(e)),e.toValue)return e.toValue(c,e,f);var j,l,m,n,o,p={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},s={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(c in s&&(c=s[c]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(c)){for(j=c.match(/([\-+]\d+)([dmwy])/gi),c=new Date,n=0;n<j.length;n++)l=j[n].match(/([\-+]\d+)([dmwy])/i),m=Number(l[1]),o=p[l[2].toLowerCase()],c=k.prototype[o](c,m);return k.prototype._zero_utc_time(c)}j=c&&c.match(this.nonpunctuation)||[];var t,u,v={},w=["yyyy","yy","M","MM","m","mm","d","dd"],x={yyyy:function(a,b){return a.setUTCFullYear(g?h(b,g):b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};x.yy=x.yyyy,x.M=x.MM=x.mm=x.m,x.dd=x.d,c=d();var y=e.parts.slice();if(j.length!==y.length&&(y=a(y).filter(function(b,c){return a.inArray(c,w)!==-1}).toArray()),j.length===y.length){var z;for(n=0,z=y.length;n<z;n++){if(t=parseInt(j[n],10),l=y[n],isNaN(t))switch(l){case"MM":u=a(q[f].months).filter(i),t=a.inArray(u[0],q[f].months)+1;break;case"M":u=a(q[f].monthsShort).filter(i),t=a.inArray(u[0],q[f].monthsShort)+1}v[l]=t}var A,B;for(n=0;n<w.length;n++)B=w[n],B in v&&!isNaN(v[B])&&(A=new Date(c),x[B](A,v[B]),isNaN(A)||(c=A))}return c},formatDate:function(b,c,d){if(!b)return"";if("string"==typeof c&&(c=r.parseFormat(c)),c.toDisplay)return c.toDisplay(b,c,d);var e={d:b.getUTCDate(),D:q[d].daysShort[b.getUTCDay()],DD:q[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:q[d].monthsShort[b.getUTCMonth()],MM:q[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+o.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+o.templates.rightArrow+"</th></tr></thead>",
8
+ contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};r.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+r.headTemplate+"<tbody></tbody>"+r.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+r.headTemplate+r.contTemplate+r.footTemplate+"</table></div></div>",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version="1.7.1",a.fn.datepicker.deprecated=function(a){var b=window.console;b&&b.warn&&b.warn("DEPRECATED: "+a)},a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),n.call(c,"show"))}),a(function(){n.call(a('[data-provide="datepicker-inline"]'))})});
@@ -0,0 +1,1653 @@
1
+ /**
2
+ * @version: 2.1.27
3
+ * @author: Dan Grossman http://www.dangrossman.info/
4
+ * @copyright: Copyright (c) 2012-2017 Dan Grossman. All rights reserved.
5
+ * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
6
+ * @website: http://www.daterangepicker.com/
7
+ */
8
+ // Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
9
+ (function (root, factory) {
10
+ if (typeof define === 'function' && define.amd) {
11
+ // AMD. Make globaly available as well
12
+ define(['moment', 'jquery'], function (moment, jquery) {
13
+ if (!jquery.fn) jquery.fn = {}; // webpack server rendering
14
+ return factory(moment, jquery);
15
+ });
16
+ } else if (typeof module === 'object' && module.exports) {
17
+ // Node / Browserify
18
+ //isomorphic issue
19
+ var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined;
20
+ if (!jQuery) {
21
+ jQuery = require('jquery');
22
+ if (!jQuery.fn) jQuery.fn = {};
23
+ }
24
+ var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment');
25
+ module.exports = factory(moment, jQuery);
26
+ } else {
27
+ // Browser globals
28
+ root.daterangepicker = factory(root.moment, root.jQuery);
29
+ }
30
+ }(this, function(moment, $) {
31
+ var DateRangePicker = function(element, options, cb) {
32
+
33
+ //default settings for options
34
+ this.parentEl = 'body';
35
+ this.element = $(element);
36
+ this.startDate = moment().startOf('day');
37
+ this.endDate = moment().endOf('day');
38
+ this.minDate = false;
39
+ this.maxDate = false;
40
+ this.dateLimit = false;
41
+ this.autoApply = false;
42
+ this.singleDatePicker = false;
43
+ this.showDropdowns = false;
44
+ this.showWeekNumbers = false;
45
+ this.showISOWeekNumbers = false;
46
+ this.showCustomRangeLabel = true;
47
+ this.timePicker = false;
48
+ this.timePicker24Hour = false;
49
+ this.timePickerIncrement = 1;
50
+ this.timePickerSeconds = false;
51
+ this.linkedCalendars = true;
52
+ this.autoUpdateInput = true;
53
+ this.alwaysShowCalendars = false;
54
+ this.ranges = {};
55
+
56
+ this.opens = 'right';
57
+ if (this.element.hasClass('pull-right'))
58
+ this.opens = 'left';
59
+
60
+ this.drops = 'down';
61
+ if (this.element.hasClass('dropup'))
62
+ this.drops = 'up';
63
+
64
+ this.buttonClasses = 'btn btn-sm';
65
+ this.applyClass = 'btn-success';
66
+ this.cancelClass = 'btn-default';
67
+
68
+ this.locale = {
69
+ direction: 'ltr',
70
+ format: moment.localeData().longDateFormat('L'),
71
+ separator: ' - ',
72
+ applyLabel: 'Apply',
73
+ cancelLabel: 'Cancel',
74
+ weekLabel: 'W',
75
+ customRangeLabel: 'Custom Range',
76
+ daysOfWeek: moment.weekdaysMin(),
77
+ monthNames: moment.monthsShort(),
78
+ firstDay: moment.localeData().firstDayOfWeek()
79
+ };
80
+
81
+ this.callback = function() { };
82
+
83
+ //some state information
84
+ this.isShowing = false;
85
+ this.leftCalendar = {};
86
+ this.rightCalendar = {};
87
+
88
+ //custom options from user
89
+ if (typeof options !== 'object' || options === null)
90
+ options = {};
91
+
92
+ //allow setting options with data attributes
93
+ //data-api options will be overwritten with custom javascript options
94
+ options = $.extend(this.element.data(), options);
95
+
96
+ //html template for the picker UI
97
+ if (typeof options.template !== 'string' && !(options.template instanceof $))
98
+ options.template = '<div class="daterangepicker dropdown-menu">' +
99
+ '<div class="calendar left">' +
100
+ '<div class="daterangepicker_input">' +
101
+ '<input class="input-mini form-control" type="text" name="daterangepicker_start" value="" />' +
102
+ '<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
103
+ '<div class="calendar-time">' +
104
+ '<div></div>' +
105
+ '<i class="fa fa-clock-o glyphicon glyphicon-time"></i>' +
106
+ '</div>' +
107
+ '</div>' +
108
+ '<div class="calendar-table"></div>' +
109
+ '</div>' +
110
+ '<div class="calendar right">' +
111
+ '<div class="daterangepicker_input">' +
112
+ '<input class="input-mini form-control" type="text" name="daterangepicker_end" value="" />' +
113
+ '<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
114
+ '<div class="calendar-time">' +
115
+ '<div></div>' +
116
+ '<i class="fa fa-clock-o glyphicon glyphicon-time"></i>' +
117
+ '</div>' +
118
+ '</div>' +
119
+ '<div class="calendar-table"></div>' +
120
+ '</div>' +
121
+ '<div class="ranges">' +
122
+ '<div class="range_inputs">' +
123
+ '<button class="applyBtn" disabled="disabled" type="button"></button> ' +
124
+ '<button class="cancelBtn" type="button"></button>' +
125
+ '</div>' +
126
+ '</div>' +
127
+ '</div>';
128
+
129
+ this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);
130
+ this.container = $(options.template).appendTo(this.parentEl);
131
+
132
+ //
133
+ // handle all the possible options overriding defaults
134
+ //
135
+
136
+ if (typeof options.locale === 'object') {
137
+
138
+ if (typeof options.locale.direction === 'string')
139
+ this.locale.direction = options.locale.direction;
140
+
141
+ if (typeof options.locale.format === 'string')
142
+ this.locale.format = options.locale.format;
143
+
144
+ if (typeof options.locale.separator === 'string')
145
+ this.locale.separator = options.locale.separator;
146
+
147
+ if (typeof options.locale.daysOfWeek === 'object')
148
+ this.locale.daysOfWeek = options.locale.daysOfWeek.slice();
149
+
150
+ if (typeof options.locale.monthNames === 'object')
151
+ this.locale.monthNames = options.locale.monthNames.slice();
152
+
153
+ if (typeof options.locale.firstDay === 'number')
154
+ this.locale.firstDay = options.locale.firstDay;
155
+
156
+ if (typeof options.locale.applyLabel === 'string')
157
+ this.locale.applyLabel = options.locale.applyLabel;
158
+
159
+ if (typeof options.locale.cancelLabel === 'string')
160
+ this.locale.cancelLabel = options.locale.cancelLabel;
161
+
162
+ if (typeof options.locale.weekLabel === 'string')
163
+ this.locale.weekLabel = options.locale.weekLabel;
164
+
165
+ if (typeof options.locale.customRangeLabel === 'string'){
166
+ //Support unicode chars in the custom range name.
167
+ var elem = document.createElement('textarea');
168
+ elem.innerHTML = options.locale.customRangeLabel;
169
+ var rangeHtml = elem.value;
170
+ this.locale.customRangeLabel = rangeHtml;
171
+ }
172
+ }
173
+ this.container.addClass(this.locale.direction);
174
+
175
+ if (typeof options.startDate === 'string')
176
+ this.startDate = moment(options.startDate, this.locale.format);
177
+
178
+ if (typeof options.endDate === 'string')
179
+ this.endDate = moment(options.endDate, this.locale.format);
180
+
181
+ if (typeof options.minDate === 'string')
182
+ this.minDate = moment(options.minDate, this.locale.format);
183
+
184
+ if (typeof options.maxDate === 'string')
185
+ this.maxDate = moment(options.maxDate, this.locale.format);
186
+
187
+ if (typeof options.startDate === 'object')
188
+ this.startDate = moment(options.startDate);
189
+
190
+ if (typeof options.endDate === 'object')
191
+ this.endDate = moment(options.endDate);
192
+
193
+ if (typeof options.minDate === 'object')
194
+ this.minDate = moment(options.minDate);
195
+
196
+ if (typeof options.maxDate === 'object')
197
+ this.maxDate = moment(options.maxDate);
198
+
199
+ // sanity check for bad options
200
+ if (this.minDate && this.startDate.isBefore(this.minDate))
201
+ this.startDate = this.minDate.clone();
202
+
203
+ // sanity check for bad options
204
+ if (this.maxDate && this.endDate.isAfter(this.maxDate))
205
+ this.endDate = this.maxDate.clone();
206
+
207
+ if (typeof options.applyClass === 'string')
208
+ this.applyClass = options.applyClass;
209
+
210
+ if (typeof options.cancelClass === 'string')
211
+ this.cancelClass = options.cancelClass;
212
+
213
+ if (typeof options.dateLimit === 'object')
214
+ this.dateLimit = options.dateLimit;
215
+
216
+ if (typeof options.opens === 'string')
217
+ this.opens = options.opens;
218
+
219
+ if (typeof options.drops === 'string')
220
+ this.drops = options.drops;
221
+
222
+ if (typeof options.showWeekNumbers === 'boolean')
223
+ this.showWeekNumbers = options.showWeekNumbers;
224
+
225
+ if (typeof options.showISOWeekNumbers === 'boolean')
226
+ this.showISOWeekNumbers = options.showISOWeekNumbers;
227
+
228
+ if (typeof options.buttonClasses === 'string')
229
+ this.buttonClasses = options.buttonClasses;
230
+
231
+ if (typeof options.buttonClasses === 'object')
232
+ this.buttonClasses = options.buttonClasses.join(' ');
233
+
234
+ if (typeof options.showDropdowns === 'boolean')
235
+ this.showDropdowns = options.showDropdowns;
236
+
237
+ if (typeof options.showCustomRangeLabel === 'boolean')
238
+ this.showCustomRangeLabel = options.showCustomRangeLabel;
239
+
240
+ if (typeof options.singleDatePicker === 'boolean') {
241
+ this.singleDatePicker = options.singleDatePicker;
242
+ if (this.singleDatePicker)
243
+ this.endDate = this.startDate.clone();
244
+ }
245
+
246
+ if (typeof options.timePicker === 'boolean')
247
+ this.timePicker = options.timePicker;
248
+
249
+ if (typeof options.timePickerSeconds === 'boolean')
250
+ this.timePickerSeconds = options.timePickerSeconds;
251
+
252
+ if (typeof options.timePickerIncrement === 'number')
253
+ this.timePickerIncrement = options.timePickerIncrement;
254
+
255
+ if (typeof options.timePicker24Hour === 'boolean')
256
+ this.timePicker24Hour = options.timePicker24Hour;
257
+
258
+ if (typeof options.autoApply === 'boolean')
259
+ this.autoApply = options.autoApply;
260
+
261
+ if (typeof options.autoUpdateInput === 'boolean')
262
+ this.autoUpdateInput = options.autoUpdateInput;
263
+
264
+ if (typeof options.linkedCalendars === 'boolean')
265
+ this.linkedCalendars = options.linkedCalendars;
266
+
267
+ if (typeof options.isInvalidDate === 'function')
268
+ this.isInvalidDate = options.isInvalidDate;
269
+
270
+ if (typeof options.isCustomDate === 'function')
271
+ this.isCustomDate = options.isCustomDate;
272
+
273
+ if (typeof options.alwaysShowCalendars === 'boolean')
274
+ this.alwaysShowCalendars = options.alwaysShowCalendars;
275
+
276
+ // update day names order to firstDay
277
+ if (this.locale.firstDay != 0) {
278
+ var iterator = this.locale.firstDay;
279
+ while (iterator > 0) {
280
+ this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
281
+ iterator--;
282
+ }
283
+ }
284
+
285
+ var start, end, range;
286
+
287
+ //if no start/end dates set, check if an input element contains initial values
288
+ if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
289
+ if ($(this.element).is('input[type=text]')) {
290
+ var val = $(this.element).val(),
291
+ split = val.split(this.locale.separator);
292
+
293
+ start = end = null;
294
+
295
+ if (split.length == 2) {
296
+ start = moment(split[0], this.locale.format);
297
+ end = moment(split[1], this.locale.format);
298
+ } else if (this.singleDatePicker && val !== "") {
299
+ start = moment(val, this.locale.format);
300
+ end = moment(val, this.locale.format);
301
+ }
302
+ if (start !== null && end !== null) {
303
+ this.setStartDate(start);
304
+ this.setEndDate(end);
305
+ }
306
+ }
307
+ }
308
+
309
+ if (typeof options.ranges === 'object') {
310
+ for (range in options.ranges) {
311
+
312
+ if (typeof options.ranges[range][0] === 'string')
313
+ start = moment(options.ranges[range][0], this.locale.format);
314
+ else
315
+ start = moment(options.ranges[range][0]);
316
+
317
+ if (typeof options.ranges[range][1] === 'string')
318
+ end = moment(options.ranges[range][1], this.locale.format);
319
+ else
320
+ end = moment(options.ranges[range][1]);
321
+
322
+ // If the start or end date exceed those allowed by the minDate or dateLimit
323
+ // options, shorten the range to the allowable period.
324
+ if (this.minDate && start.isBefore(this.minDate))
325
+ start = this.minDate.clone();
326
+
327
+ var maxDate = this.maxDate;
328
+ if (this.dateLimit && maxDate && start.clone().add(this.dateLimit).isAfter(maxDate))
329
+ maxDate = start.clone().add(this.dateLimit);
330
+ if (maxDate && end.isAfter(maxDate))
331
+ end = maxDate.clone();
332
+
333
+ // If the end of the range is before the minimum or the start of the range is
334
+ // after the maximum, don't display this range option at all.
335
+ if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day'))
336
+ || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))
337
+ continue;
338
+
339
+ //Support unicode chars in the range names.
340
+ var elem = document.createElement('textarea');
341
+ elem.innerHTML = range;
342
+ var rangeHtml = elem.value;
343
+
344
+ this.ranges[rangeHtml] = [start, end];
345
+ }
346
+
347
+ var list = '<ul>';
348
+ for (range in this.ranges) {
349
+ list += '<li data-range-key="' + range + '">' + range + '</li>';
350
+ }
351
+ if (this.showCustomRangeLabel) {
352
+ list += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + '</li>';
353
+ }
354
+ list += '</ul>';
355
+ this.container.find('.ranges').prepend(list);
356
+ }
357
+
358
+ if (typeof cb === 'function') {
359
+ this.callback = cb;
360
+ }
361
+
362
+ if (!this.timePicker) {
363
+ this.startDate = this.startDate.startOf('day');
364
+ this.endDate = this.endDate.endOf('day');
365
+ this.container.find('.calendar-time').hide();
366
+ }
367
+
368
+ //can't be used together for now
369
+ if (this.timePicker && this.autoApply)
370
+ this.autoApply = false;
371
+
372
+ if (this.autoApply && typeof options.ranges !== 'object') {
373
+ this.container.find('.ranges').hide();
374
+ } else if (this.autoApply) {
375
+ this.container.find('.applyBtn, .cancelBtn').addClass('hide');
376
+ }
377
+
378
+ if (this.singleDatePicker) {
379
+ this.container.addClass('single');
380
+ this.container.find('.calendar.left').addClass('single');
381
+ this.container.find('.calendar.left').show();
382
+ this.container.find('.calendar.right').hide();
383
+ this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide();
384
+ if (this.timePicker) {
385
+ this.container.find('.ranges ul').hide();
386
+ } else {
387
+ this.container.find('.ranges').hide();
388
+ }
389
+ }
390
+
391
+ if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) {
392
+ this.container.addClass('show-calendar');
393
+ }
394
+
395
+ this.container.addClass('opens' + this.opens);
396
+
397
+ //swap the position of the predefined ranges if opens right
398
+ if (typeof options.ranges !== 'undefined' && this.opens == 'right') {
399
+ this.container.find('.ranges').prependTo( this.container.find('.calendar.left').parent() );
400
+ }
401
+
402
+ //apply CSS classes and labels to buttons
403
+ this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);
404
+ if (this.applyClass.length)
405
+ this.container.find('.applyBtn').addClass(this.applyClass);
406
+ if (this.cancelClass.length)
407
+ this.container.find('.cancelBtn').addClass(this.cancelClass);
408
+ this.container.find('.applyBtn').html(this.locale.applyLabel);
409
+ this.container.find('.cancelBtn').html(this.locale.cancelLabel);
410
+
411
+ //
412
+ // event listeners
413
+ //
414
+
415
+ this.container.find('.calendar')
416
+ .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))
417
+ .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))
418
+ .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this))
419
+ .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))
420
+ .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))
421
+ .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))
422
+ .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))
423
+ .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this))
424
+ .on('click.daterangepicker', '.daterangepicker_input input', $.proxy(this.showCalendars, this))
425
+ .on('focus.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsFocused, this))
426
+ .on('blur.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsBlurred, this))
427
+ .on('change.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsChanged, this))
428
+ .on('keydown.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsKeydown, this));
429
+
430
+ this.container.find('.ranges')
431
+ .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))
432
+ .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))
433
+ .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))
434
+ .on('mouseenter.daterangepicker', 'li', $.proxy(this.hoverRange, this))
435
+ .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));
436
+
437
+ if (this.element.is('input') || this.element.is('button')) {
438
+ this.element.on({
439
+ 'click.daterangepicker': $.proxy(this.show, this),
440
+ 'focus.daterangepicker': $.proxy(this.show, this),
441
+ 'keyup.daterangepicker': $.proxy(this.elementChanged, this),
442
+ 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility
443
+ });
444
+ } else {
445
+ this.element.on('click.daterangepicker', $.proxy(this.toggle, this));
446
+ this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this));
447
+ }
448
+
449
+ //
450
+ // if attached to a text input, set the initial value
451
+ //
452
+
453
+ if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {
454
+ this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
455
+ this.element.trigger('change');
456
+ } else if (this.element.is('input') && this.autoUpdateInput) {
457
+ this.element.val(this.startDate.format(this.locale.format));
458
+ this.element.trigger('change');
459
+ }
460
+
461
+ };
462
+
463
+ DateRangePicker.prototype = {
464
+
465
+ constructor: DateRangePicker,
466
+
467
+ setStartDate: function(startDate) {
468
+ if (typeof startDate === 'string')
469
+ this.startDate = moment(startDate, this.locale.format);
470
+
471
+ if (typeof startDate === 'object')
472
+ this.startDate = moment(startDate);
473
+
474
+ if (!this.timePicker)
475
+ this.startDate = this.startDate.startOf('day');
476
+
477
+ if (this.timePicker && this.timePickerIncrement)
478
+ this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
479
+
480
+ if (this.minDate && this.startDate.isBefore(this.minDate)) {
481
+ this.startDate = this.minDate.clone();
482
+ if (this.timePicker && this.timePickerIncrement)
483
+ this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
484
+ }
485
+
486
+ if (this.maxDate && this.startDate.isAfter(this.maxDate)) {
487
+ this.startDate = this.maxDate.clone();
488
+ if (this.timePicker && this.timePickerIncrement)
489
+ this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
490
+ }
491
+
492
+ if (!this.isShowing)
493
+ this.updateElement();
494
+
495
+ this.updateMonthsInView();
496
+ },
497
+
498
+ setEndDate: function(endDate) {
499
+ if (typeof endDate === 'string')
500
+ this.endDate = moment(endDate, this.locale.format);
501
+
502
+ if (typeof endDate === 'object')
503
+ this.endDate = moment(endDate);
504
+
505
+ if (!this.timePicker)
506
+ this.endDate = this.endDate.add(1,'d').startOf('day').subtract(1,'second');
507
+
508
+ if (this.timePicker && this.timePickerIncrement)
509
+ this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
510
+
511
+ if (this.endDate.isBefore(this.startDate))
512
+ this.endDate = this.startDate.clone();
513
+
514
+ if (this.maxDate && this.endDate.isAfter(this.maxDate))
515
+ this.endDate = this.maxDate.clone();
516
+
517
+ if (this.dateLimit && this.startDate.clone().add(this.dateLimit).isBefore(this.endDate))
518
+ this.endDate = this.startDate.clone().add(this.dateLimit);
519
+
520
+ this.previousRightTime = this.endDate.clone();
521
+
522
+ if (!this.isShowing)
523
+ this.updateElement();
524
+
525
+ this.updateMonthsInView();
526
+ },
527
+
528
+ isInvalidDate: function() {
529
+ return false;
530
+ },
531
+
532
+ isCustomDate: function() {
533
+ return false;
534
+ },
535
+
536
+ updateView: function() {
537
+ if (this.timePicker) {
538
+ this.renderTimePicker('left');
539
+ this.renderTimePicker('right');
540
+ if (!this.endDate) {
541
+ this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled');
542
+ } else {
543
+ this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled');
544
+ }
545
+ }
546
+ if (this.endDate) {
547
+ this.container.find('input[name="daterangepicker_end"]').removeClass('active');
548
+ this.container.find('input[name="daterangepicker_start"]').addClass('active');
549
+ } else {
550
+ this.container.find('input[name="daterangepicker_end"]').addClass('active');
551
+ this.container.find('input[name="daterangepicker_start"]').removeClass('active');
552
+ }
553
+ this.updateMonthsInView();
554
+ this.updateCalendars();
555
+ this.updateFormInputs();
556
+ },
557
+
558
+ updateMonthsInView: function() {
559
+ if (this.endDate) {
560
+
561
+ //if both dates are visible already, do nothing
562
+ if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&
563
+ (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
564
+ &&
565
+ (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
566
+ ) {
567
+ return;
568
+ }
569
+
570
+ this.leftCalendar.month = this.startDate.clone().date(2);
571
+ if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) {
572
+ this.rightCalendar.month = this.endDate.clone().date(2);
573
+ } else {
574
+ this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
575
+ }
576
+
577
+ } else {
578
+ if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {
579
+ this.leftCalendar.month = this.startDate.clone().date(2);
580
+ this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
581
+ }
582
+ }
583
+ if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) {
584
+ this.rightCalendar.month = this.maxDate.clone().date(2);
585
+ this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');
586
+ }
587
+ },
588
+
589
+ updateCalendars: function() {
590
+
591
+ if (this.timePicker) {
592
+ var hour, minute, second;
593
+ if (this.endDate) {
594
+ hour = parseInt(this.container.find('.left .hourselect').val(), 10);
595
+ minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
596
+ second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
597
+ if (!this.timePicker24Hour) {
598
+ var ampm = this.container.find('.left .ampmselect').val();
599
+ if (ampm === 'PM' && hour < 12)
600
+ hour += 12;
601
+ if (ampm === 'AM' && hour === 12)
602
+ hour = 0;
603
+ }
604
+ } else {
605
+ hour = parseInt(this.container.find('.right .hourselect').val(), 10);
606
+ minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
607
+ second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
608
+ if (!this.timePicker24Hour) {
609
+ var ampm = this.container.find('.right .ampmselect').val();
610
+ if (ampm === 'PM' && hour < 12)
611
+ hour += 12;
612
+ if (ampm === 'AM' && hour === 12)
613
+ hour = 0;
614
+ }
615
+ }
616
+ this.leftCalendar.month.hour(hour).minute(minute).second(second);
617
+ this.rightCalendar.month.hour(hour).minute(minute).second(second);
618
+ }
619
+
620
+ this.renderCalendar('left');
621
+ this.renderCalendar('right');
622
+
623
+ //highlight any predefined range matching the current start and end dates
624
+ this.container.find('.ranges li').removeClass('active');
625
+ if (this.endDate == null) return;
626
+
627
+ this.calculateChosenLabel();
628
+ },
629
+
630
+ renderCalendar: function(side) {
631
+
632
+ //
633
+ // Build the matrix of dates that will populate the calendar
634
+ //
635
+
636
+ var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar;
637
+ var month = calendar.month.month();
638
+ var year = calendar.month.year();
639
+ var hour = calendar.month.hour();
640
+ var minute = calendar.month.minute();
641
+ var second = calendar.month.second();
642
+ var daysInMonth = moment([year, month]).daysInMonth();
643
+ var firstDay = moment([year, month, 1]);
644
+ var lastDay = moment([year, month, daysInMonth]);
645
+ var lastMonth = moment(firstDay).subtract(1, 'month').month();
646
+ var lastYear = moment(firstDay).subtract(1, 'month').year();
647
+ var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
648
+ var dayOfWeek = firstDay.day();
649
+
650
+ //initialize a 6 rows x 7 columns array for the calendar
651
+ var calendar = [];
652
+ calendar.firstDay = firstDay;
653
+ calendar.lastDay = lastDay;
654
+
655
+ for (var i = 0; i < 6; i++) {
656
+ calendar[i] = [];
657
+ }
658
+
659
+ //populate the calendar with date objects
660
+ var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
661
+ if (startDay > daysInLastMonth)
662
+ startDay -= 7;
663
+
664
+ if (dayOfWeek == this.locale.firstDay)
665
+ startDay = daysInLastMonth - 6;
666
+
667
+ var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]);
668
+
669
+ var col, row;
670
+ for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {
671
+ if (i > 0 && col % 7 === 0) {
672
+ col = 0;
673
+ row++;
674
+ }
675
+ calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second);
676
+ curDate.hour(12);
677
+
678
+ if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {
679
+ calendar[row][col] = this.minDate.clone();
680
+ }
681
+
682
+ if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {
683
+ calendar[row][col] = this.maxDate.clone();
684
+ }
685
+
686
+ }
687
+
688
+ //make the calendar object available to hoverDate/clickDate
689
+ if (side == 'left') {
690
+ this.leftCalendar.calendar = calendar;
691
+ } else {
692
+ this.rightCalendar.calendar = calendar;
693
+ }
694
+
695
+ //
696
+ // Display the calendar
697
+ //
698
+
699
+ var minDate = side == 'left' ? this.minDate : this.startDate;
700
+ var maxDate = this.maxDate;
701
+ var selected = side == 'left' ? this.startDate : this.endDate;
702
+ var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};
703
+
704
+ var html = '<table class="table-condensed">';
705
+ html += '<thead>';
706
+ html += '<tr>';
707
+
708
+ // add empty cell for week number
709
+ if (this.showWeekNumbers || this.showISOWeekNumbers)
710
+ html += '<th></th>';
711
+
712
+ if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {
713
+ html += '<th class="prev available"><i class="fa fa-' + arrow.left + ' glyphicon glyphicon-' + arrow.left + '"></i></th>';
714
+ } else {
715
+ html += '<th></th>';
716
+ }
717
+
718
+ var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
719
+
720
+ if (this.showDropdowns) {
721
+ var currentMonth = calendar[1][1].month();
722
+ var currentYear = calendar[1][1].year();
723
+ var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
724
+ var minYear = (minDate && minDate.year()) || (currentYear - 50);
725
+ var inMinYear = currentYear == minYear;
726
+ var inMaxYear = currentYear == maxYear;
727
+
728
+ var monthHtml = '<select class="monthselect">';
729
+ for (var m = 0; m < 12; m++) {
730
+ if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {
731
+ monthHtml += "<option value='" + m + "'" +
732
+ (m === currentMonth ? " selected='selected'" : "") +
733
+ ">" + this.locale.monthNames[m] + "</option>";
734
+ } else {
735
+ monthHtml += "<option value='" + m + "'" +
736
+ (m === currentMonth ? " selected='selected'" : "") +
737
+ " disabled='disabled'>" + this.locale.monthNames[m] + "</option>";
738
+ }
739
+ }
740
+ monthHtml += "</select>";
741
+
742
+ var yearHtml = '<select class="yearselect">';
743
+ for (var y = minYear; y <= maxYear; y++) {
744
+ yearHtml += '<option value="' + y + '"' +
745
+ (y === currentYear ? ' selected="selected"' : '') +
746
+ '>' + y + '</option>';
747
+ }
748
+ yearHtml += '</select>';
749
+
750
+ dateHtml = monthHtml + yearHtml;
751
+ }
752
+
753
+ html += '<th colspan="5" class="month">' + dateHtml + '</th>';
754
+ if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {
755
+ html += '<th class="next available"><i class="fa fa-' + arrow.right + ' glyphicon glyphicon-' + arrow.right + '"></i></th>';
756
+ } else {
757
+ html += '<th></th>';
758
+ }
759
+
760
+ html += '</tr>';
761
+ html += '<tr>';
762
+
763
+ // add week number label
764
+ if (this.showWeekNumbers || this.showISOWeekNumbers)
765
+ html += '<th class="week">' + this.locale.weekLabel + '</th>';
766
+
767
+ $.each(this.locale.daysOfWeek, function(index, dayOfWeek) {
768
+ html += '<th>' + dayOfWeek + '</th>';
769
+ });
770
+
771
+ html += '</tr>';
772
+ html += '</thead>';
773
+ html += '<tbody>';
774
+
775
+ //adjust maxDate to reflect the dateLimit setting in order to
776
+ //grey out end dates beyond the dateLimit
777
+ if (this.endDate == null && this.dateLimit) {
778
+ var maxLimit = this.startDate.clone().add(this.dateLimit).endOf('day');
779
+ if (!maxDate || maxLimit.isBefore(maxDate)) {
780
+ maxDate = maxLimit;
781
+ }
782
+ }
783
+
784
+ for (var row = 0; row < 6; row++) {
785
+ html += '<tr>';
786
+
787
+ // add week number
788
+ if (this.showWeekNumbers)
789
+ html += '<td class="week">' + calendar[row][0].week() + '</td>';
790
+ else if (this.showISOWeekNumbers)
791
+ html += '<td class="week">' + calendar[row][0].isoWeek() + '</td>';
792
+
793
+ for (var col = 0; col < 7; col++) {
794
+
795
+ var classes = [];
796
+
797
+ //highlight today's date
798
+ if (calendar[row][col].isSame(new Date(), "day"))
799
+ classes.push('today');
800
+
801
+ //highlight weekends
802
+ if (calendar[row][col].isoWeekday() > 5)
803
+ classes.push('weekend');
804
+
805
+ //grey out the dates in other months displayed at beginning and end of this calendar
806
+ if (calendar[row][col].month() != calendar[1][1].month())
807
+ classes.push('off');
808
+
809
+ //don't allow selection of dates before the minimum date
810
+ if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))
811
+ classes.push('off', 'disabled');
812
+
813
+ //don't allow selection of dates after the maximum date
814
+ if (maxDate && calendar[row][col].isAfter(maxDate, 'day'))
815
+ classes.push('off', 'disabled');
816
+
817
+ //don't allow selection of date if a custom function decides it's invalid
818
+ if (this.isInvalidDate(calendar[row][col]))
819
+ classes.push('off', 'disabled');
820
+
821
+ //highlight the currently selected start date
822
+ if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD'))
823
+ classes.push('active', 'start-date');
824
+
825
+ //highlight the currently selected end date
826
+ if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD'))
827
+ classes.push('active', 'end-date');
828
+
829
+ //highlight dates in-between the selected dates
830
+ if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)
831
+ classes.push('in-range');
832
+
833
+ //apply custom classes for this date
834
+ var isCustom = this.isCustomDate(calendar[row][col]);
835
+ if (isCustom !== false) {
836
+ if (typeof isCustom === 'string')
837
+ classes.push(isCustom);
838
+ else
839
+ Array.prototype.push.apply(classes, isCustom);
840
+ }
841
+
842
+ var cname = '', disabled = false;
843
+ for (var i = 0; i < classes.length; i++) {
844
+ cname += classes[i] + ' ';
845
+ if (classes[i] == 'disabled')
846
+ disabled = true;
847
+ }
848
+ if (!disabled)
849
+ cname += 'available';
850
+
851
+ html += '<td class="' + cname.replace(/^\s+|\s+$/g, '') + '" data-title="' + 'r' + row + 'c' + col + '">' + calendar[row][col].date() + '</td>';
852
+
853
+ }
854
+ html += '</tr>';
855
+ }
856
+
857
+ html += '</tbody>';
858
+ html += '</table>';
859
+
860
+ this.container.find('.calendar.' + side + ' .calendar-table').html(html);
861
+
862
+ },
863
+
864
+ renderTimePicker: function(side) {
865
+
866
+ // Don't bother updating the time picker if it's currently disabled
867
+ // because an end date hasn't been clicked yet
868
+ if (side == 'right' && !this.endDate) return;
869
+
870
+ var html, selected, minDate, maxDate = this.maxDate;
871
+
872
+ if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))
873
+ maxDate = this.startDate.clone().add(this.dateLimit);
874
+
875
+ if (side == 'left') {
876
+ selected = this.startDate.clone();
877
+ minDate = this.minDate;
878
+ } else if (side == 'right') {
879
+ selected = this.endDate.clone();
880
+ minDate = this.startDate;
881
+
882
+ //Preserve the time already selected
883
+ var timeSelector = this.container.find('.calendar.right .calendar-time div');
884
+ if (timeSelector.html() != '') {
885
+
886
+ selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());
887
+ selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());
888
+ selected.second(timeSelector.find('.secondselect option:selected').val() || selected.second());
889
+
890
+ if (!this.timePicker24Hour) {
891
+ var ampm = timeSelector.find('.ampmselect option:selected').val();
892
+ if (ampm === 'PM' && selected.hour() < 12)
893
+ selected.hour(selected.hour() + 12);
894
+ if (ampm === 'AM' && selected.hour() === 12)
895
+ selected.hour(0);
896
+ }
897
+
898
+ }
899
+
900
+ if (selected.isBefore(this.startDate))
901
+ selected = this.startDate.clone();
902
+
903
+ if (maxDate && selected.isAfter(maxDate))
904
+ selected = maxDate.clone();
905
+
906
+ }
907
+
908
+ //
909
+ // hours
910
+ //
911
+
912
+ html = '<select class="hourselect">';
913
+
914
+ var start = this.timePicker24Hour ? 0 : 1;
915
+ var end = this.timePicker24Hour ? 23 : 12;
916
+
917
+ for (var i = start; i <= end; i++) {
918
+ var i_in_24 = i;
919
+ if (!this.timePicker24Hour)
920
+ i_in_24 = selected.hour() >= 12 ? (i == 12 ? 12 : i + 12) : (i == 12 ? 0 : i);
921
+
922
+ var time = selected.clone().hour(i_in_24);
923
+ var disabled = false;
924
+ if (minDate && time.minute(59).isBefore(minDate))
925
+ disabled = true;
926
+ if (maxDate && time.minute(0).isAfter(maxDate))
927
+ disabled = true;
928
+
929
+ if (i_in_24 == selected.hour() && !disabled) {
930
+ html += '<option value="' + i + '" selected="selected">' + i + '</option>';
931
+ } else if (disabled) {
932
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + i + '</option>';
933
+ } else {
934
+ html += '<option value="' + i + '">' + i + '</option>';
935
+ }
936
+ }
937
+
938
+ html += '</select> ';
939
+
940
+ //
941
+ // minutes
942
+ //
943
+
944
+ html += ': <select class="minuteselect">';
945
+
946
+ for (var i = 0; i < 60; i += this.timePickerIncrement) {
947
+ var padded = i < 10 ? '0' + i : i;
948
+ var time = selected.clone().minute(i);
949
+
950
+ var disabled = false;
951
+ if (minDate && time.second(59).isBefore(minDate))
952
+ disabled = true;
953
+ if (maxDate && time.second(0).isAfter(maxDate))
954
+ disabled = true;
955
+
956
+ if (selected.minute() == i && !disabled) {
957
+ html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
958
+ } else if (disabled) {
959
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
960
+ } else {
961
+ html += '<option value="' + i + '">' + padded + '</option>';
962
+ }
963
+ }
964
+
965
+ html += '</select> ';
966
+
967
+ //
968
+ // seconds
969
+ //
970
+
971
+ if (this.timePickerSeconds) {
972
+ html += ': <select class="secondselect">';
973
+
974
+ for (var i = 0; i < 60; i++) {
975
+ var padded = i < 10 ? '0' + i : i;
976
+ var time = selected.clone().second(i);
977
+
978
+ var disabled = false;
979
+ if (minDate && time.isBefore(minDate))
980
+ disabled = true;
981
+ if (maxDate && time.isAfter(maxDate))
982
+ disabled = true;
983
+
984
+ if (selected.second() == i && !disabled) {
985
+ html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
986
+ } else if (disabled) {
987
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
988
+ } else {
989
+ html += '<option value="' + i + '">' + padded + '</option>';
990
+ }
991
+ }
992
+
993
+ html += '</select> ';
994
+ }
995
+
996
+ //
997
+ // AM/PM
998
+ //
999
+
1000
+ if (!this.timePicker24Hour) {
1001
+ html += '<select class="ampmselect">';
1002
+
1003
+ var am_html = '';
1004
+ var pm_html = '';
1005
+
1006
+ if (minDate && selected.clone().hour(12).minute(0).second(0).isBefore(minDate))
1007
+ am_html = ' disabled="disabled" class="disabled"';
1008
+
1009
+ if (maxDate && selected.clone().hour(0).minute(0).second(0).isAfter(maxDate))
1010
+ pm_html = ' disabled="disabled" class="disabled"';
1011
+
1012
+ if (selected.hour() >= 12) {
1013
+ html += '<option value="AM"' + am_html + '>AM</option><option value="PM" selected="selected"' + pm_html + '>PM</option>';
1014
+ } else {
1015
+ html += '<option value="AM" selected="selected"' + am_html + '>AM</option><option value="PM"' + pm_html + '>PM</option>';
1016
+ }
1017
+
1018
+ html += '</select>';
1019
+ }
1020
+
1021
+ this.container.find('.calendar.' + side + ' .calendar-time div').html(html);
1022
+
1023
+ },
1024
+
1025
+ updateFormInputs: function() {
1026
+
1027
+ //ignore mouse movements while an above-calendar text input has focus
1028
+ if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
1029
+ return;
1030
+
1031
+ this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.locale.format));
1032
+ if (this.endDate)
1033
+ this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.locale.format));
1034
+
1035
+ if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) {
1036
+ this.container.find('button.applyBtn').removeAttr('disabled');
1037
+ } else {
1038
+ this.container.find('button.applyBtn').attr('disabled', 'disabled');
1039
+ }
1040
+
1041
+ },
1042
+
1043
+ move: function() {
1044
+ var parentOffset = { top: 0, left: 0 },
1045
+ containerTop;
1046
+ var parentRightEdge = $(window).width();
1047
+ if (!this.parentEl.is('body')) {
1048
+ parentOffset = {
1049
+ top: this.parentEl.offset().top - this.parentEl.scrollTop(),
1050
+ left: this.parentEl.offset().left - this.parentEl.scrollLeft()
1051
+ };
1052
+ parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;
1053
+ }
1054
+
1055
+ if (this.drops == 'up')
1056
+ containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;
1057
+ else
1058
+ containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;
1059
+ this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('dropup');
1060
+
1061
+ if (this.opens == 'left') {
1062
+ this.container.css({
1063
+ top: containerTop,
1064
+ right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),
1065
+ left: 'auto'
1066
+ });
1067
+ if (this.container.offset().left < 0) {
1068
+ this.container.css({
1069
+ right: 'auto',
1070
+ left: 9
1071
+ });
1072
+ }
1073
+ } else if (this.opens == 'center') {
1074
+ this.container.css({
1075
+ top: containerTop,
1076
+ left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
1077
+ - this.container.outerWidth() / 2,
1078
+ right: 'auto'
1079
+ });
1080
+ if (this.container.offset().left < 0) {
1081
+ this.container.css({
1082
+ right: 'auto',
1083
+ left: 9
1084
+ });
1085
+ }
1086
+ } else {
1087
+ this.container.css({
1088
+ top: containerTop,
1089
+ left: this.element.offset().left - parentOffset.left,
1090
+ right: 'auto'
1091
+ });
1092
+ if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {
1093
+ this.container.css({
1094
+ left: 'auto',
1095
+ right: 0
1096
+ });
1097
+ }
1098
+ }
1099
+ },
1100
+
1101
+ show: function(e) {
1102
+ if (this.isShowing) return;
1103
+
1104
+ // Create a click proxy that is private to this instance of datepicker, for unbinding
1105
+ this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this);
1106
+
1107
+ // Bind global datepicker mousedown for hiding and
1108
+ $(document)
1109
+ .on('mousedown.daterangepicker', this._outsideClickProxy)
1110
+ // also support mobile devices
1111
+ .on('touchend.daterangepicker', this._outsideClickProxy)
1112
+ // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
1113
+ .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
1114
+ // and also close when focus changes to outside the picker (eg. tabbing between controls)
1115
+ .on('focusin.daterangepicker', this._outsideClickProxy);
1116
+
1117
+ // Reposition the picker if the window is resized while it's open
1118
+ $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this));
1119
+
1120
+ this.oldStartDate = this.startDate.clone();
1121
+ this.oldEndDate = this.endDate.clone();
1122
+ this.previousRightTime = this.endDate.clone();
1123
+
1124
+ this.updateView();
1125
+ this.container.show();
1126
+ this.move();
1127
+ this.element.trigger('show.daterangepicker', this);
1128
+ this.isShowing = true;
1129
+ },
1130
+
1131
+ hide: function(e) {
1132
+ if (!this.isShowing) return;
1133
+
1134
+ //incomplete date selection, revert to last values
1135
+ if (!this.endDate) {
1136
+ this.startDate = this.oldStartDate.clone();
1137
+ this.endDate = this.oldEndDate.clone();
1138
+ }
1139
+
1140
+ //if a new date range was selected, invoke the user callback function
1141
+ if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
1142
+ this.callback(this.startDate, this.endDate, this.chosenLabel);
1143
+
1144
+ //if picker is attached to a text input, update it
1145
+ this.updateElement();
1146
+
1147
+ $(document).off('.daterangepicker');
1148
+ $(window).off('.daterangepicker');
1149
+ this.container.hide();
1150
+ this.element.trigger('hide.daterangepicker', this);
1151
+ this.isShowing = false;
1152
+ },
1153
+
1154
+ toggle: function(e) {
1155
+ if (this.isShowing) {
1156
+ this.hide();
1157
+ } else {
1158
+ this.show();
1159
+ }
1160
+ },
1161
+
1162
+ outsideClick: function(e) {
1163
+ var target = $(e.target);
1164
+ // if the page is clicked anywhere except within the daterangerpicker/button
1165
+ // itself then call this.hide()
1166
+ if (
1167
+ // ie modal dialog fix
1168
+ e.type == "focusin" ||
1169
+ target.closest(this.element).length ||
1170
+ target.closest(this.container).length ||
1171
+ target.closest('.calendar-table').length
1172
+ ) return;
1173
+ this.hide();
1174
+ this.element.trigger('outsideClick.daterangepicker', this);
1175
+ },
1176
+
1177
+ showCalendars: function() {
1178
+ this.container.addClass('show-calendar');
1179
+ this.move();
1180
+ this.element.trigger('showCalendar.daterangepicker', this);
1181
+ },
1182
+
1183
+ hideCalendars: function() {
1184
+ this.container.removeClass('show-calendar');
1185
+ this.element.trigger('hideCalendar.daterangepicker', this);
1186
+ },
1187
+
1188
+ hoverRange: function(e) {
1189
+
1190
+ //ignore mouse movements while an above-calendar text input has focus
1191
+ if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
1192
+ return;
1193
+
1194
+ var label = e.target.getAttribute('data-range-key');
1195
+
1196
+ if (label == this.locale.customRangeLabel) {
1197
+ this.updateView();
1198
+ } else {
1199
+ var dates = this.ranges[label];
1200
+ this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.locale.format));
1201
+ this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.locale.format));
1202
+ }
1203
+
1204
+ },
1205
+
1206
+ clickRange: function(e) {
1207
+ var label = e.target.getAttribute('data-range-key');
1208
+ this.chosenLabel = label;
1209
+ if (label == this.locale.customRangeLabel) {
1210
+ this.showCalendars();
1211
+ } else {
1212
+ var dates = this.ranges[label];
1213
+ this.startDate = dates[0];
1214
+ this.endDate = dates[1];
1215
+
1216
+ if (!this.timePicker) {
1217
+ this.startDate.startOf('day');
1218
+ this.endDate.endOf('day');
1219
+ }
1220
+
1221
+ if (!this.alwaysShowCalendars)
1222
+ this.hideCalendars();
1223
+ this.clickApply();
1224
+ }
1225
+ },
1226
+
1227
+ clickPrev: function(e) {
1228
+ var cal = $(e.target).parents('.calendar');
1229
+ if (cal.hasClass('left')) {
1230
+ this.leftCalendar.month.subtract(1, 'month');
1231
+ if (this.linkedCalendars)
1232
+ this.rightCalendar.month.subtract(1, 'month');
1233
+ } else {
1234
+ this.rightCalendar.month.subtract(1, 'month');
1235
+ }
1236
+ this.updateCalendars();
1237
+ },
1238
+
1239
+ clickNext: function(e) {
1240
+ var cal = $(e.target).parents('.calendar');
1241
+ if (cal.hasClass('left')) {
1242
+ this.leftCalendar.month.add(1, 'month');
1243
+ } else {
1244
+ this.rightCalendar.month.add(1, 'month');
1245
+ if (this.linkedCalendars)
1246
+ this.leftCalendar.month.add(1, 'month');
1247
+ }
1248
+ this.updateCalendars();
1249
+ },
1250
+
1251
+ hoverDate: function(e) {
1252
+
1253
+ //ignore mouse movements while an above-calendar text input has focus
1254
+ //if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
1255
+ // return;
1256
+
1257
+ //ignore dates that can't be selected
1258
+ if (!$(e.target).hasClass('available')) return;
1259
+
1260
+ //have the text inputs above calendars reflect the date being hovered over
1261
+ var title = $(e.target).attr('data-title');
1262
+ var row = title.substr(1, 1);
1263
+ var col = title.substr(3, 1);
1264
+ var cal = $(e.target).parents('.calendar');
1265
+ var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
1266
+
1267
+ if (this.endDate && !this.container.find('input[name=daterangepicker_start]').is(":focus")) {
1268
+ this.container.find('input[name=daterangepicker_start]').val(date.format(this.locale.format));
1269
+ } else if (!this.endDate && !this.container.find('input[name=daterangepicker_end]').is(":focus")) {
1270
+ this.container.find('input[name=daterangepicker_end]').val(date.format(this.locale.format));
1271
+ }
1272
+
1273
+ //highlight the dates between the start date and the date being hovered as a potential end date
1274
+ var leftCalendar = this.leftCalendar;
1275
+ var rightCalendar = this.rightCalendar;
1276
+ var startDate = this.startDate;
1277
+ if (!this.endDate) {
1278
+ this.container.find('.calendar tbody td').each(function(index, el) {
1279
+
1280
+ //skip week numbers, only look at dates
1281
+ if ($(el).hasClass('week')) return;
1282
+
1283
+ var title = $(el).attr('data-title');
1284
+ var row = title.substr(1, 1);
1285
+ var col = title.substr(3, 1);
1286
+ var cal = $(el).parents('.calendar');
1287
+ var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];
1288
+
1289
+ if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {
1290
+ $(el).addClass('in-range');
1291
+ } else {
1292
+ $(el).removeClass('in-range');
1293
+ }
1294
+
1295
+ });
1296
+ }
1297
+
1298
+ },
1299
+
1300
+ clickDate: function(e) {
1301
+
1302
+ if (!$(e.target).hasClass('available')) return;
1303
+
1304
+ var title = $(e.target).attr('data-title');
1305
+ var row = title.substr(1, 1);
1306
+ var col = title.substr(3, 1);
1307
+ var cal = $(e.target).parents('.calendar');
1308
+ var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
1309
+
1310
+ //
1311
+ // this function needs to do a few things:
1312
+ // * alternate between selecting a start and end date for the range,
1313
+ // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date
1314
+ // * if autoapply is enabled, and an end date was chosen, apply the selection
1315
+ // * if single date picker mode, and time picker isn't enabled, apply the selection immediately
1316
+ // * if one of the inputs above the calendars was focused, cancel that manual input
1317
+ //
1318
+
1319
+ if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start
1320
+ if (this.timePicker) {
1321
+ var hour = parseInt(this.container.find('.left .hourselect').val(), 10);
1322
+ if (!this.timePicker24Hour) {
1323
+ var ampm = this.container.find('.left .ampmselect').val();
1324
+ if (ampm === 'PM' && hour < 12)
1325
+ hour += 12;
1326
+ if (ampm === 'AM' && hour === 12)
1327
+ hour = 0;
1328
+ }
1329
+ var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
1330
+ var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
1331
+ date = date.clone().hour(hour).minute(minute).second(second);
1332
+ }
1333
+ this.endDate = null;
1334
+ this.setStartDate(date.clone());
1335
+ } else if (!this.endDate && date.isBefore(this.startDate)) {
1336
+ //special case: clicking the same date for start/end,
1337
+ //but the time of the end date is before the start date
1338
+ this.setEndDate(this.startDate.clone());
1339
+ } else { // picking end
1340
+ if (this.timePicker) {
1341
+ var hour = parseInt(this.container.find('.right .hourselect').val(), 10);
1342
+ if (!this.timePicker24Hour) {
1343
+ var ampm = this.container.find('.right .ampmselect').val();
1344
+ if (ampm === 'PM' && hour < 12)
1345
+ hour += 12;
1346
+ if (ampm === 'AM' && hour === 12)
1347
+ hour = 0;
1348
+ }
1349
+ var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
1350
+ var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
1351
+ date = date.clone().hour(hour).minute(minute).second(second);
1352
+ }
1353
+ this.setEndDate(date.clone());
1354
+ if (this.autoApply) {
1355
+ this.calculateChosenLabel();
1356
+ this.clickApply();
1357
+ }
1358
+ }
1359
+
1360
+ if (this.singleDatePicker) {
1361
+ this.setEndDate(this.startDate);
1362
+ if (!this.timePicker)
1363
+ this.clickApply();
1364
+ }
1365
+
1366
+ this.updateView();
1367
+
1368
+ //This is to cancel the blur event handler if the mouse was in one of the inputs
1369
+ e.stopPropagation();
1370
+
1371
+ },
1372
+
1373
+ calculateChosenLabel: function () {
1374
+ var customRange = true;
1375
+ var i = 0;
1376
+ for (var range in this.ranges) {
1377
+ if (this.timePicker) {
1378
+ var format = this.timePickerSeconds ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD hh:mm";
1379
+ //ignore times when comparing dates if time picker seconds is not enabled
1380
+ if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) {
1381
+ customRange = false;
1382
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();
1383
+ break;
1384
+ }
1385
+ } else {
1386
+ //ignore times when comparing dates if time picker is not enabled
1387
+ if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
1388
+ customRange = false;
1389
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();
1390
+ break;
1391
+ }
1392
+ }
1393
+ i++;
1394
+ }
1395
+ if (customRange) {
1396
+ if (this.showCustomRangeLabel) {
1397
+ this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html();
1398
+ } else {
1399
+ this.chosenLabel = null;
1400
+ }
1401
+ this.showCalendars();
1402
+ }
1403
+ },
1404
+
1405
+ clickApply: function(e) {
1406
+ this.hide();
1407
+ this.element.trigger('apply.daterangepicker', this);
1408
+ },
1409
+
1410
+ clickCancel: function(e) {
1411
+ this.startDate = this.oldStartDate;
1412
+ this.endDate = this.oldEndDate;
1413
+ this.hide();
1414
+ this.element.trigger('cancel.daterangepicker', this);
1415
+ },
1416
+
1417
+ monthOrYearChanged: function(e) {
1418
+ var isLeft = $(e.target).closest('.calendar').hasClass('left'),
1419
+ leftOrRight = isLeft ? 'left' : 'right',
1420
+ cal = this.container.find('.calendar.'+leftOrRight);
1421
+
1422
+ // Month must be Number for new moment versions
1423
+ var month = parseInt(cal.find('.monthselect').val(), 10);
1424
+ var year = cal.find('.yearselect').val();
1425
+
1426
+ if (!isLeft) {
1427
+ if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) {
1428
+ month = this.startDate.month();
1429
+ year = this.startDate.year();
1430
+ }
1431
+ }
1432
+
1433
+ if (this.minDate) {
1434
+ if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) {
1435
+ month = this.minDate.month();
1436
+ year = this.minDate.year();
1437
+ }
1438
+ }
1439
+
1440
+ if (this.maxDate) {
1441
+ if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) {
1442
+ month = this.maxDate.month();
1443
+ year = this.maxDate.year();
1444
+ }
1445
+ }
1446
+
1447
+ if (isLeft) {
1448
+ this.leftCalendar.month.month(month).year(year);
1449
+ if (this.linkedCalendars)
1450
+ this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month');
1451
+ } else {
1452
+ this.rightCalendar.month.month(month).year(year);
1453
+ if (this.linkedCalendars)
1454
+ this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month');
1455
+ }
1456
+ this.updateCalendars();
1457
+ },
1458
+
1459
+ timeChanged: function(e) {
1460
+
1461
+ var cal = $(e.target).closest('.calendar'),
1462
+ isLeft = cal.hasClass('left');
1463
+
1464
+ var hour = parseInt(cal.find('.hourselect').val(), 10);
1465
+ var minute = parseInt(cal.find('.minuteselect').val(), 10);
1466
+ var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;
1467
+
1468
+ if (!this.timePicker24Hour) {
1469
+ var ampm = cal.find('.ampmselect').val();
1470
+ if (ampm === 'PM' && hour < 12)
1471
+ hour += 12;
1472
+ if (ampm === 'AM' && hour === 12)
1473
+ hour = 0;
1474
+ }
1475
+
1476
+ if (isLeft) {
1477
+ var start = this.startDate.clone();
1478
+ start.hour(hour);
1479
+ start.minute(minute);
1480
+ start.second(second);
1481
+ this.setStartDate(start);
1482
+ if (this.singleDatePicker) {
1483
+ this.endDate = this.startDate.clone();
1484
+ } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) {
1485
+ this.setEndDate(start.clone());
1486
+ }
1487
+ } else if (this.endDate) {
1488
+ var end = this.endDate.clone();
1489
+ end.hour(hour);
1490
+ end.minute(minute);
1491
+ end.second(second);
1492
+ this.setEndDate(end);
1493
+ }
1494
+
1495
+ //update the calendars so all clickable dates reflect the new time component
1496
+ this.updateCalendars();
1497
+
1498
+ //update the form inputs above the calendars with the new time
1499
+ this.updateFormInputs();
1500
+
1501
+ //re-render the time pickers because changing one selection can affect what's enabled in another
1502
+ this.renderTimePicker('left');
1503
+ this.renderTimePicker('right');
1504
+
1505
+ },
1506
+
1507
+ formInputsChanged: function(e) {
1508
+ var isRight = $(e.target).closest('.calendar').hasClass('right');
1509
+ var start = moment(this.container.find('input[name="daterangepicker_start"]').val(), this.locale.format);
1510
+ var end = moment(this.container.find('input[name="daterangepicker_end"]').val(), this.locale.format);
1511
+
1512
+ if (start.isValid() && end.isValid()) {
1513
+
1514
+ if (isRight && end.isBefore(start))
1515
+ start = end.clone();
1516
+
1517
+ this.setStartDate(start);
1518
+ this.setEndDate(end);
1519
+
1520
+ if (isRight) {
1521
+ this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format));
1522
+ } else {
1523
+ this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format));
1524
+ }
1525
+
1526
+ }
1527
+
1528
+ this.updateView();
1529
+ },
1530
+
1531
+ formInputsFocused: function(e) {
1532
+
1533
+ // Highlight the focused input
1534
+ this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass('active');
1535
+ $(e.target).addClass('active');
1536
+
1537
+ // Set the state such that if the user goes back to using a mouse,
1538
+ // the calendars are aware we're selecting the end of the range, not
1539
+ // the start. This allows someone to edit the end of a date range without
1540
+ // re-selecting the beginning, by clicking on the end date input then
1541
+ // using the calendar.
1542
+ var isRight = $(e.target).closest('.calendar').hasClass('right');
1543
+ if (isRight) {
1544
+ this.endDate = null;
1545
+ this.setStartDate(this.startDate.clone());
1546
+ this.updateView();
1547
+ }
1548
+
1549
+ },
1550
+
1551
+ formInputsBlurred: function(e) {
1552
+
1553
+ // this function has one purpose right now: if you tab from the first
1554
+ // text input to the second in the UI, the endDate is nulled so that
1555
+ // you can click another, but if you tab out without clicking anything
1556
+ // or changing the input value, the old endDate should be retained
1557
+
1558
+ if (!this.endDate) {
1559
+ var val = this.container.find('input[name="daterangepicker_end"]').val();
1560
+ var end = moment(val, this.locale.format);
1561
+ if (end.isValid()) {
1562
+ this.setEndDate(end);
1563
+ this.updateView();
1564
+ }
1565
+ }
1566
+
1567
+ },
1568
+
1569
+ formInputsKeydown: function(e) {
1570
+ // This function ensures that if the 'enter' key was pressed in the input, then the calendars
1571
+ // are updated with the startDate and endDate.
1572
+ // This behaviour is automatic in Chrome/Firefox/Edge but not in IE 11 hence why this exists.
1573
+ // Other browsers and versions of IE are untested and the behaviour is unknown.
1574
+ if (e.keyCode === 13) {
1575
+ // Prevent the calendar from being updated twice on Chrome/Firefox/Edge
1576
+ e.preventDefault();
1577
+ this.formInputsChanged(e);
1578
+ }
1579
+ },
1580
+
1581
+
1582
+ elementChanged: function() {
1583
+ if (!this.element.is('input')) return;
1584
+ if (!this.element.val().length) return;
1585
+
1586
+ var dateString = this.element.val().split(this.locale.separator),
1587
+ start = null,
1588
+ end = null;
1589
+
1590
+ if (dateString.length === 2) {
1591
+ start = moment(dateString[0], this.locale.format);
1592
+ end = moment(dateString[1], this.locale.format);
1593
+ }
1594
+
1595
+ if (this.singleDatePicker || start === null || end === null) {
1596
+ start = moment(this.element.val(), this.locale.format);
1597
+ end = start;
1598
+ }
1599
+
1600
+ if (!start.isValid() || !end.isValid()) return;
1601
+
1602
+ this.setStartDate(start);
1603
+ this.setEndDate(end);
1604
+ this.updateView();
1605
+ },
1606
+
1607
+ keydown: function(e) {
1608
+ //hide on tab or enter
1609
+ if ((e.keyCode === 9) || (e.keyCode === 13)) {
1610
+ this.hide();
1611
+ }
1612
+
1613
+ //hide on esc and prevent propagation
1614
+ if (e.keyCode === 27) {
1615
+ e.preventDefault();
1616
+ e.stopPropagation();
1617
+
1618
+ this.hide();
1619
+ }
1620
+ },
1621
+
1622
+ updateElement: function() {
1623
+ if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {
1624
+ this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
1625
+ this.element.trigger('change');
1626
+ } else if (this.element.is('input') && this.autoUpdateInput) {
1627
+ this.element.val(this.startDate.format(this.locale.format));
1628
+ this.element.trigger('change');
1629
+ }
1630
+ },
1631
+
1632
+ remove: function() {
1633
+ this.container.remove();
1634
+ this.element.off('.daterangepicker');
1635
+ this.element.removeData();
1636
+ }
1637
+
1638
+ };
1639
+
1640
+ $.fn.daterangepicker = function(options, callback) {
1641
+ var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options);
1642
+ this.each(function() {
1643
+ var el = $(this);
1644
+ if (el.data('daterangepicker'))
1645
+ el.data('daterangepicker').remove();
1646
+ el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback));
1647
+ });
1648
+ return this;
1649
+ };
1650
+
1651
+ return DateRangePicker;
1652
+
1653
+ }));