card-mod-date 0.19.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (879) hide show
  1. checksums.yaml +4 -4
  2. metadata +4 -881
  3. data/vendor/moment/CHANGELOG.md +0 -964
  4. data/vendor/moment/CONTRIBUTING.md +0 -103
  5. data/vendor/moment/FAQ.md +0 -28
  6. data/vendor/moment/Gruntfile.js +0 -255
  7. data/vendor/moment/LICENSE +0 -22
  8. data/vendor/moment/Moment.js.nuspec +0 -31
  9. data/vendor/moment/README.md +0 -55
  10. data/vendor/moment/benchmarks/add.js +0 -22
  11. data/vendor/moment/benchmarks/clone.js +0 -10
  12. data/vendor/moment/benchmarks/compare.js +0 -33
  13. data/vendor/moment/benchmarks/endOf.js +0 -22
  14. data/vendor/moment/benchmarks/fromDate.js +0 -12
  15. data/vendor/moment/benchmarks/fromDateUtc.js +0 -12
  16. data/vendor/moment/benchmarks/get.js +0 -21
  17. data/vendor/moment/benchmarks/isObjectEmpty.js +0 -67
  18. data/vendor/moment/benchmarks/load-missing.js +0 -13
  19. data/vendor/moment/benchmarks/makeDuration.js +0 -11
  20. data/vendor/moment/benchmarks/query.js +0 -40
  21. data/vendor/moment/benchmarks/set.js +0 -22
  22. data/vendor/moment/benchmarks/startOf.js +0 -22
  23. data/vendor/moment/benchmarks/subtract.js +0 -22
  24. data/vendor/moment/benchmarks/zeroFill.js +0 -43
  25. data/vendor/moment/bower.json +0 -26
  26. data/vendor/moment/component.json +0 -147
  27. data/vendor/moment/composer.json +0 -33
  28. data/vendor/moment/dist/locale/af.js +0 -71
  29. data/vendor/moment/dist/locale/ar-dz.js +0 -156
  30. data/vendor/moment/dist/locale/ar-kw.js +0 -54
  31. data/vendor/moment/dist/locale/ar-ly.js +0 -171
  32. data/vendor/moment/dist/locale/ar-ma.js +0 -55
  33. data/vendor/moment/dist/locale/ar-sa.js +0 -104
  34. data/vendor/moment/dist/locale/ar-tn.js +0 -54
  35. data/vendor/moment/dist/locale/ar.js +0 -189
  36. data/vendor/moment/dist/locale/az.js +0 -101
  37. data/vendor/moment/dist/locale/be.js +0 -141
  38. data/vendor/moment/dist/locale/bg.js +0 -87
  39. data/vendor/moment/dist/locale/bm.js +0 -52
  40. data/vendor/moment/dist/locale/bn-bd.js +0 -128
  41. data/vendor/moment/dist/locale/bn.js +0 -118
  42. data/vendor/moment/dist/locale/bo.js +0 -122
  43. data/vendor/moment/dist/locale/br.js +0 -165
  44. data/vendor/moment/dist/locale/bs.js +0 -149
  45. data/vendor/moment/dist/locale/ca.js +0 -97
  46. data/vendor/moment/dist/locale/cs.js +0 -171
  47. data/vendor/moment/dist/locale/cv.js +0 -62
  48. data/vendor/moment/dist/locale/cy.js +0 -97
  49. data/vendor/moment/dist/locale/da.js +0 -53
  50. data/vendor/moment/dist/locale/de-at.js +0 -79
  51. data/vendor/moment/dist/locale/de-ch.js +0 -78
  52. data/vendor/moment/dist/locale/de.js +0 -78
  53. data/vendor/moment/dist/locale/dv.js +0 -90
  54. data/vendor/moment/dist/locale/el.js +0 -104
  55. data/vendor/moment/dist/locale/en-au.js +0 -68
  56. data/vendor/moment/dist/locale/en-ca.js +0 -64
  57. data/vendor/moment/dist/locale/en-gb.js +0 -68
  58. data/vendor/moment/dist/locale/en-ie.js +0 -68
  59. data/vendor/moment/dist/locale/en-il.js +0 -64
  60. data/vendor/moment/dist/locale/en-in.js +0 -68
  61. data/vendor/moment/dist/locale/en-nz.js +0 -68
  62. data/vendor/moment/dist/locale/en-sg.js +0 -68
  63. data/vendor/moment/dist/locale/eo.js +0 -68
  64. data/vendor/moment/dist/locale/es-do.js +0 -104
  65. data/vendor/moment/dist/locale/es-mx.js +0 -106
  66. data/vendor/moment/dist/locale/es-us.js +0 -106
  67. data/vendor/moment/dist/locale/es.js +0 -106
  68. data/vendor/moment/dist/locale/et.js +0 -78
  69. data/vendor/moment/dist/locale/eu.js +0 -63
  70. data/vendor/moment/dist/locale/fa.js +0 -110
  71. data/vendor/moment/dist/locale/fi.js +0 -121
  72. data/vendor/moment/dist/locale/fil.js +0 -58
  73. data/vendor/moment/dist/locale/fo.js +0 -56
  74. data/vendor/moment/dist/locale/fr-ca.js +0 -69
  75. data/vendor/moment/dist/locale/fr-ch.js +0 -73
  76. data/vendor/moment/dist/locale/fr.js +0 -104
  77. data/vendor/moment/dist/locale/fy.js +0 -77
  78. data/vendor/moment/dist/locale/ga.js +0 -95
  79. data/vendor/moment/dist/locale/gd.js +0 -95
  80. data/vendor/moment/dist/locale/gl.js +0 -74
  81. data/vendor/moment/dist/locale/gom-deva.js +0 -124
  82. data/vendor/moment/dist/locale/gom-latn.js +0 -124
  83. data/vendor/moment/dist/locale/gu.js +0 -121
  84. data/vendor/moment/dist/locale/he.js +0 -94
  85. data/vendor/moment/dist/locale/hi.js +0 -119
  86. data/vendor/moment/dist/locale/hr.js +0 -154
  87. data/vendor/moment/dist/locale/hu.js +0 -118
  88. data/vendor/moment/dist/locale/hy-am.js +0 -92
  89. data/vendor/moment/dist/locale/id.js +0 -76
  90. data/vendor/moment/dist/locale/is.js +0 -139
  91. data/vendor/moment/dist/locale/it-ch.js +0 -64
  92. data/vendor/moment/dist/locale/it.js +0 -106
  93. data/vendor/moment/dist/locale/ja.js +0 -148
  94. data/vendor/moment/dist/locale/jv.js +0 -76
  95. data/vendor/moment/dist/locale/ka.js +0 -92
  96. data/vendor/moment/dist/locale/kk.js +0 -82
  97. data/vendor/moment/dist/locale/km.js +0 -102
  98. data/vendor/moment/dist/locale/kn.js +0 -123
  99. data/vendor/moment/dist/locale/ko.js +0 -75
  100. data/vendor/moment/dist/locale/ku.js +0 -118
  101. data/vendor/moment/dist/locale/ky.js +0 -84
  102. data/vendor/moment/dist/locale/lb.js +0 -135
  103. data/vendor/moment/dist/locale/lo.js +0 -65
  104. data/vendor/moment/dist/locale/lt.js +0 -123
  105. data/vendor/moment/dist/locale/lv.js +0 -93
  106. data/vendor/moment/dist/locale/me.js +0 -118
  107. data/vendor/moment/dist/locale/mi.js +0 -59
  108. data/vendor/moment/dist/locale/mk.js +0 -85
  109. data/vendor/moment/dist/locale/ml.js +0 -80
  110. data/vendor/moment/dist/locale/mn.js +0 -99
  111. data/vendor/moment/dist/locale/mr.js +0 -202
  112. data/vendor/moment/dist/locale/ms-my.js +0 -76
  113. data/vendor/moment/dist/locale/ms.js +0 -75
  114. data/vendor/moment/dist/locale/mt.js +0 -55
  115. data/vendor/moment/dist/locale/my.js +0 -91
  116. data/vendor/moment/dist/locale/nb.js +0 -61
  117. data/vendor/moment/dist/locale/ne.js +0 -120
  118. data/vendor/moment/dist/locale/nl-be.js +0 -102
  119. data/vendor/moment/dist/locale/nl.js +0 -104
  120. data/vendor/moment/dist/locale/nn.js +0 -60
  121. data/vendor/moment/dist/locale/oc-lnc.js +0 -83
  122. data/vendor/moment/dist/locale/pa-in.js +0 -121
  123. data/vendor/moment/dist/locale/pl.js +0 -139
  124. data/vendor/moment/dist/locale/pt-br.js +0 -57
  125. data/vendor/moment/dist/locale/pt.js +0 -62
  126. data/vendor/moment/dist/locale/ro.js +0 -75
  127. data/vendor/moment/dist/locale/ru.js +0 -206
  128. data/vendor/moment/dist/locale/sd.js +0 -81
  129. data/vendor/moment/dist/locale/se.js +0 -57
  130. data/vendor/moment/dist/locale/si.js +0 -68
  131. data/vendor/moment/dist/locale/sk.js +0 -144
  132. data/vendor/moment/dist/locale/sl.js +0 -170
  133. data/vendor/moment/dist/locale/sq.js +0 -65
  134. data/vendor/moment/dist/locale/sr-cyrl.js +0 -116
  135. data/vendor/moment/dist/locale/sr.js +0 -118
  136. data/vendor/moment/dist/locale/ss.js +0 -83
  137. data/vendor/moment/dist/locale/sv.js +0 -68
  138. data/vendor/moment/dist/locale/sw.js +0 -54
  139. data/vendor/moment/dist/locale/ta.js +0 -129
  140. data/vendor/moment/dist/locale/te.js +0 -86
  141. data/vendor/moment/dist/locale/tet.js +0 -68
  142. data/vendor/moment/dist/locale/tg.js +0 -116
  143. data/vendor/moment/dist/locale/th.js +0 -64
  144. data/vendor/moment/dist/locale/tk.js +0 -91
  145. data/vendor/moment/dist/locale/tl-ph.js +0 -57
  146. data/vendor/moment/dist/locale/tlh.js +0 -125
  147. data/vendor/moment/dist/locale/tr.js +0 -106
  148. data/vendor/moment/dist/locale/tzl.js +0 -89
  149. data/vendor/moment/dist/locale/tzm-latn.js +0 -53
  150. data/vendor/moment/dist/locale/tzm.js +0 -53
  151. data/vendor/moment/dist/locale/ug-cn.js +0 -110
  152. data/vendor/moment/dist/locale/uk.js +0 -163
  153. data/vendor/moment/dist/locale/ur.js +0 -82
  154. data/vendor/moment/dist/locale/uz-latn.js +0 -53
  155. data/vendor/moment/dist/locale/uz.js +0 -51
  156. data/vendor/moment/dist/locale/vi.js +0 -79
  157. data/vendor/moment/dist/locale/x-pseudo.js +0 -71
  158. data/vendor/moment/dist/locale/yo.js +0 -53
  159. data/vendor/moment/dist/locale/zh-cn.js +0 -120
  160. data/vendor/moment/dist/locale/zh-hk.js +0 -101
  161. data/vendor/moment/dist/locale/zh-mo.js +0 -100
  162. data/vendor/moment/dist/locale/zh-tw.js +0 -99
  163. data/vendor/moment/dist/moment.js +0 -5663
  164. data/vendor/moment/ender.js +0 -1
  165. data/vendor/moment/locale/af.js +0 -82
  166. data/vendor/moment/locale/ar-dz.js +0 -167
  167. data/vendor/moment/locale/ar-kw.js +0 -65
  168. data/vendor/moment/locale/ar-ly.js +0 -182
  169. data/vendor/moment/locale/ar-ma.js +0 -66
  170. data/vendor/moment/locale/ar-sa.js +0 -115
  171. data/vendor/moment/locale/ar-tn.js +0 -65
  172. data/vendor/moment/locale/ar.js +0 -200
  173. data/vendor/moment/locale/az.js +0 -112
  174. data/vendor/moment/locale/be.js +0 -152
  175. data/vendor/moment/locale/bg.js +0 -98
  176. data/vendor/moment/locale/bm.js +0 -62
  177. data/vendor/moment/locale/bn-bd.js +0 -139
  178. data/vendor/moment/locale/bn.js +0 -129
  179. data/vendor/moment/locale/bo.js +0 -133
  180. data/vendor/moment/locale/br.js +0 -176
  181. data/vendor/moment/locale/bs.js +0 -160
  182. data/vendor/moment/locale/ca.js +0 -108
  183. data/vendor/moment/locale/cs.js +0 -182
  184. data/vendor/moment/locale/cv.js +0 -73
  185. data/vendor/moment/locale/cy.js +0 -108
  186. data/vendor/moment/locale/da.js +0 -64
  187. data/vendor/moment/locale/de-at.js +0 -90
  188. data/vendor/moment/locale/de-ch.js +0 -87
  189. data/vendor/moment/locale/de.js +0 -89
  190. data/vendor/moment/locale/dv.js +0 -101
  191. data/vendor/moment/locale/el.js +0 -115
  192. data/vendor/moment/locale/en-au.js +0 -79
  193. data/vendor/moment/locale/en-ca.js +0 -75
  194. data/vendor/moment/locale/en-gb.js +0 -79
  195. data/vendor/moment/locale/en-ie.js +0 -79
  196. data/vendor/moment/locale/en-il.js +0 -75
  197. data/vendor/moment/locale/en-in.js +0 -79
  198. data/vendor/moment/locale/en-nz.js +0 -79
  199. data/vendor/moment/locale/en-sg.js +0 -79
  200. data/vendor/moment/locale/eo.js +0 -79
  201. data/vendor/moment/locale/es-do.js +0 -115
  202. data/vendor/moment/locale/es-mx.js +0 -117
  203. data/vendor/moment/locale/es-us.js +0 -117
  204. data/vendor/moment/locale/es.js +0 -117
  205. data/vendor/moment/locale/et.js +0 -89
  206. data/vendor/moment/locale/eu.js +0 -74
  207. data/vendor/moment/locale/fa.js +0 -121
  208. data/vendor/moment/locale/fi.js +0 -132
  209. data/vendor/moment/locale/fil.js +0 -69
  210. data/vendor/moment/locale/fo.js +0 -67
  211. data/vendor/moment/locale/fr-ca.js +0 -80
  212. data/vendor/moment/locale/fr-ch.js +0 -84
  213. data/vendor/moment/locale/fr.js +0 -115
  214. data/vendor/moment/locale/fy.js +0 -88
  215. data/vendor/moment/locale/ga.js +0 -106
  216. data/vendor/moment/locale/gd.js +0 -106
  217. data/vendor/moment/locale/gl.js +0 -85
  218. data/vendor/moment/locale/gom-deva.js +0 -135
  219. data/vendor/moment/locale/gom-latn.js +0 -135
  220. data/vendor/moment/locale/gu.js +0 -132
  221. data/vendor/moment/locale/he.js +0 -105
  222. data/vendor/moment/locale/hi.js +0 -130
  223. data/vendor/moment/locale/hr.js +0 -165
  224. data/vendor/moment/locale/hu.js +0 -129
  225. data/vendor/moment/locale/hy-am.js +0 -103
  226. data/vendor/moment/locale/id.js +0 -87
  227. data/vendor/moment/locale/is.js +0 -150
  228. data/vendor/moment/locale/it-ch.js +0 -75
  229. data/vendor/moment/locale/it.js +0 -117
  230. data/vendor/moment/locale/ja.js +0 -159
  231. data/vendor/moment/locale/jv.js +0 -87
  232. data/vendor/moment/locale/ka.js +0 -103
  233. data/vendor/moment/locale/kk.js +0 -93
  234. data/vendor/moment/locale/km.js +0 -113
  235. data/vendor/moment/locale/kn.js +0 -134
  236. data/vendor/moment/locale/ko.js +0 -86
  237. data/vendor/moment/locale/ku.js +0 -129
  238. data/vendor/moment/locale/ky.js +0 -95
  239. data/vendor/moment/locale/lb.js +0 -146
  240. data/vendor/moment/locale/lo.js +0 -76
  241. data/vendor/moment/locale/lt.js +0 -134
  242. data/vendor/moment/locale/lv.js +0 -104
  243. data/vendor/moment/locale/me.js +0 -129
  244. data/vendor/moment/locale/mi.js +0 -70
  245. data/vendor/moment/locale/mk.js +0 -97
  246. data/vendor/moment/locale/ml.js +0 -91
  247. data/vendor/moment/locale/mn.js +0 -110
  248. data/vendor/moment/locale/mr.js +0 -213
  249. data/vendor/moment/locale/ms-my.js +0 -87
  250. data/vendor/moment/locale/ms.js +0 -86
  251. data/vendor/moment/locale/mt.js +0 -66
  252. data/vendor/moment/locale/my.js +0 -102
  253. data/vendor/moment/locale/nb.js +0 -72
  254. data/vendor/moment/locale/ne.js +0 -131
  255. data/vendor/moment/locale/nl-be.js +0 -113
  256. data/vendor/moment/locale/nl.js +0 -115
  257. data/vendor/moment/locale/nn.js +0 -71
  258. data/vendor/moment/locale/oc-lnc.js +0 -94
  259. data/vendor/moment/locale/pa-in.js +0 -132
  260. data/vendor/moment/locale/pl.js +0 -150
  261. data/vendor/moment/locale/pt-br.js +0 -68
  262. data/vendor/moment/locale/pt.js +0 -73
  263. data/vendor/moment/locale/ro.js +0 -86
  264. data/vendor/moment/locale/ru.js +0 -217
  265. data/vendor/moment/locale/sd.js +0 -92
  266. data/vendor/moment/locale/se.js +0 -68
  267. data/vendor/moment/locale/si.js +0 -79
  268. data/vendor/moment/locale/sk.js +0 -155
  269. data/vendor/moment/locale/sl.js +0 -181
  270. data/vendor/moment/locale/sq.js +0 -76
  271. data/vendor/moment/locale/sr-cyrl.js +0 -127
  272. data/vendor/moment/locale/sr.js +0 -129
  273. data/vendor/moment/locale/ss.js +0 -94
  274. data/vendor/moment/locale/sv.js +0 -79
  275. data/vendor/moment/locale/sw.js +0 -65
  276. data/vendor/moment/locale/ta.js +0 -140
  277. data/vendor/moment/locale/te.js +0 -97
  278. data/vendor/moment/locale/tet.js +0 -79
  279. data/vendor/moment/locale/tg.js +0 -127
  280. data/vendor/moment/locale/th.js +0 -75
  281. data/vendor/moment/locale/tk.js +0 -102
  282. data/vendor/moment/locale/tl-ph.js +0 -68
  283. data/vendor/moment/locale/tlh.js +0 -136
  284. data/vendor/moment/locale/tr.js +0 -117
  285. data/vendor/moment/locale/tzl.js +0 -100
  286. data/vendor/moment/locale/tzm-latn.js +0 -64
  287. data/vendor/moment/locale/tzm.js +0 -64
  288. data/vendor/moment/locale/ug-cn.js +0 -121
  289. data/vendor/moment/locale/uk.js +0 -174
  290. data/vendor/moment/locale/ur.js +0 -93
  291. data/vendor/moment/locale/uz-latn.js +0 -64
  292. data/vendor/moment/locale/uz.js +0 -62
  293. data/vendor/moment/locale/vi.js +0 -90
  294. data/vendor/moment/locale/x-pseudo.js +0 -82
  295. data/vendor/moment/locale/yo.js +0 -64
  296. data/vendor/moment/locale/zh-cn.js +0 -131
  297. data/vendor/moment/locale/zh-hk.js +0 -112
  298. data/vendor/moment/locale/zh-mo.js +0 -111
  299. data/vendor/moment/locale/zh-tw.js +0 -110
  300. data/vendor/moment/meteor/README.md +0 -5
  301. data/vendor/moment/meteor/export.js +0 -6
  302. data/vendor/moment/meteor/moment.js +0 -1
  303. data/vendor/moment/meteor/package.js +0 -27
  304. data/vendor/moment/meteor/test.js +0 -5
  305. data/vendor/moment/min/locales.js +0 -12384
  306. data/vendor/moment/min/locales.min.js +0 -2
  307. data/vendor/moment/min/locales.min.js.map +0 -1
  308. data/vendor/moment/min/moment-with-locales.js +0 -18039
  309. data/vendor/moment/min/moment-with-locales.min.js +0 -2
  310. data/vendor/moment/min/moment-with-locales.min.js.map +0 -1
  311. data/vendor/moment/min/moment.min.js +0 -2
  312. data/vendor/moment/min/moment.min.js.map +0 -1
  313. data/vendor/moment/min/tests.js +0 -146872
  314. data/vendor/moment/moment.d.ts +0 -796
  315. data/vendor/moment/moment.js +0 -5671
  316. data/vendor/moment/package-lock.json +0 -6460
  317. data/vendor/moment/package.js +0 -11
  318. data/vendor/moment/package.json +0 -112
  319. data/vendor/moment/scripts/locales.js +0 -146
  320. data/vendor/moment/scripts/npm_prepublish.sh +0 -49
  321. data/vendor/moment/src/lib/create/check-overflow.js +0 -57
  322. data/vendor/moment/src/lib/create/date-from-array.js +0 -35
  323. data/vendor/moment/src/lib/create/from-anything.js +0 -117
  324. data/vendor/moment/src/lib/create/from-array.js +0 -187
  325. data/vendor/moment/src/lib/create/from-object.js +0 -20
  326. data/vendor/moment/src/lib/create/from-string-and-array.js +0 -66
  327. data/vendor/moment/src/lib/create/from-string-and-format.js +0 -134
  328. data/vendor/moment/src/lib/create/from-string.js +0 -255
  329. data/vendor/moment/src/lib/create/local.js +0 -5
  330. data/vendor/moment/src/lib/create/parsing-flags.js +0 -28
  331. data/vendor/moment/src/lib/create/utc.js +0 -5
  332. data/vendor/moment/src/lib/create/valid.js +0 -51
  333. data/vendor/moment/src/lib/duration/abs.js +0 -18
  334. data/vendor/moment/src/lib/duration/add-subtract.js +0 -21
  335. data/vendor/moment/src/lib/duration/as.js +0 -88
  336. data/vendor/moment/src/lib/duration/bubble.js +0 -68
  337. data/vendor/moment/src/lib/duration/clone.js +0 -5
  338. data/vendor/moment/src/lib/duration/constructor.js +0 -42
  339. data/vendor/moment/src/lib/duration/create.js +0 -132
  340. data/vendor/moment/src/lib/duration/duration.js +0 -16
  341. data/vendor/moment/src/lib/duration/get.js +0 -27
  342. data/vendor/moment/src/lib/duration/humanize.js +0 -114
  343. data/vendor/moment/src/lib/duration/iso-string.js +0 -68
  344. data/vendor/moment/src/lib/duration/prototype.js +0 -78
  345. data/vendor/moment/src/lib/duration/valid.js +0 -54
  346. data/vendor/moment/src/lib/format/format.js +0 -103
  347. data/vendor/moment/src/lib/locale/base-config.js +0 -41
  348. data/vendor/moment/src/lib/locale/calendar.js +0 -15
  349. data/vendor/moment/src/lib/locale/constructor.js +0 -5
  350. data/vendor/moment/src/lib/locale/en.js +0 -39
  351. data/vendor/moment/src/lib/locale/formats.js +0 -36
  352. data/vendor/moment/src/lib/locale/invalid.js +0 -5
  353. data/vendor/moment/src/lib/locale/lists.js +0 -93
  354. data/vendor/moment/src/lib/locale/locale.js +0 -45
  355. data/vendor/moment/src/lib/locale/locales.js +0 -242
  356. data/vendor/moment/src/lib/locale/ordinal.js +0 -8
  357. data/vendor/moment/src/lib/locale/pre-post-format.js +0 -3
  358. data/vendor/moment/src/lib/locale/prototype.js +0 -88
  359. data/vendor/moment/src/lib/locale/relative.js +0 -32
  360. data/vendor/moment/src/lib/locale/set.js +0 -56
  361. data/vendor/moment/src/lib/moment/add-subtract.js +0 -61
  362. data/vendor/moment/src/lib/moment/calendar.js +0 -53
  363. data/vendor/moment/src/lib/moment/clone.js +0 -5
  364. data/vendor/moment/src/lib/moment/compare.js +0 -72
  365. data/vendor/moment/src/lib/moment/constructor.js +0 -77
  366. data/vendor/moment/src/lib/moment/creation-data.js +0 -9
  367. data/vendor/moment/src/lib/moment/diff.js +0 -79
  368. data/vendor/moment/src/lib/moment/format.js +0 -78
  369. data/vendor/moment/src/lib/moment/from.js +0 -20
  370. data/vendor/moment/src/lib/moment/get-set.js +0 -72
  371. data/vendor/moment/src/lib/moment/locale.js +0 -34
  372. data/vendor/moment/src/lib/moment/min-max.js +0 -62
  373. data/vendor/moment/src/lib/moment/moment.js +0 -28
  374. data/vendor/moment/src/lib/moment/now.js +0 -3
  375. data/vendor/moment/src/lib/moment/prototype.js +0 -197
  376. data/vendor/moment/src/lib/moment/start-end-of.js +0 -164
  377. data/vendor/moment/src/lib/moment/to-type.js +0 -42
  378. data/vendor/moment/src/lib/moment/to.js +0 -20
  379. data/vendor/moment/src/lib/moment/valid.js +0 -15
  380. data/vendor/moment/src/lib/parse/regex.js +0 -82
  381. data/vendor/moment/src/lib/parse/token.js +0 -34
  382. data/vendor/moment/src/lib/units/aliases.js +0 -31
  383. data/vendor/moment/src/lib/units/constants.js +0 -9
  384. data/vendor/moment/src/lib/units/day-of-month.js +0 -39
  385. data/vendor/moment/src/lib/units/day-of-week.js +0 -444
  386. data/vendor/moment/src/lib/units/day-of-year.js +0 -37
  387. data/vendor/moment/src/lib/units/era.js +0 -289
  388. data/vendor/moment/src/lib/units/hour.js +0 -159
  389. data/vendor/moment/src/lib/units/millisecond.js +0 -76
  390. data/vendor/moment/src/lib/units/minute.js +0 -29
  391. data/vendor/moment/src/lib/units/month.js +0 -349
  392. data/vendor/moment/src/lib/units/offset.js +0 -249
  393. data/vendor/moment/src/lib/units/priorities.js +0 -21
  394. data/vendor/moment/src/lib/units/quarter.js +0 -34
  395. data/vendor/moment/src/lib/units/second.js +0 -29
  396. data/vendor/moment/src/lib/units/timestamp.js +0 -20
  397. data/vendor/moment/src/lib/units/timezone.js +0 -16
  398. data/vendor/moment/src/lib/units/units.js +0 -20
  399. data/vendor/moment/src/lib/units/week-calendar-utils.js +0 -66
  400. data/vendor/moment/src/lib/units/week-year.js +0 -140
  401. data/vendor/moment/src/lib/units/week.js +0 -71
  402. data/vendor/moment/src/lib/units/year.js +0 -85
  403. data/vendor/moment/src/lib/utils/abs-ceil.js +0 -7
  404. data/vendor/moment/src/lib/utils/abs-floor.js +0 -8
  405. data/vendor/moment/src/lib/utils/abs-round.js +0 -7
  406. data/vendor/moment/src/lib/utils/compare-arrays.js +0 -18
  407. data/vendor/moment/src/lib/utils/defaults.js +0 -10
  408. data/vendor/moment/src/lib/utils/deprecate.js +0 -68
  409. data/vendor/moment/src/lib/utils/extend.js +0 -19
  410. data/vendor/moment/src/lib/utils/has-own-prop.js +0 -3
  411. data/vendor/moment/src/lib/utils/hooks.js +0 -13
  412. data/vendor/moment/src/lib/utils/index-of.js +0 -18
  413. data/vendor/moment/src/lib/utils/is-array.js +0 -6
  414. data/vendor/moment/src/lib/utils/is-calendar-spec.js +0 -25
  415. data/vendor/moment/src/lib/utils/is-date.js +0 -6
  416. data/vendor/moment/src/lib/utils/is-function.js +0 -6
  417. data/vendor/moment/src/lib/utils/is-leap-year.js +0 -3
  418. data/vendor/moment/src/lib/utils/is-moment-input.js +0 -74
  419. data/vendor/moment/src/lib/utils/is-number.js +0 -6
  420. data/vendor/moment/src/lib/utils/is-object-empty.js +0 -15
  421. data/vendor/moment/src/lib/utils/is-object.js +0 -8
  422. data/vendor/moment/src/lib/utils/is-string.js +0 -3
  423. data/vendor/moment/src/lib/utils/is-undefined.js +0 -3
  424. data/vendor/moment/src/lib/utils/keys.js +0 -20
  425. data/vendor/moment/src/lib/utils/map.js +0 -8
  426. data/vendor/moment/src/lib/utils/mod.js +0 -3
  427. data/vendor/moment/src/lib/utils/some.js +0 -20
  428. data/vendor/moment/src/lib/utils/to-int.js +0 -12
  429. data/vendor/moment/src/lib/utils/zero-fill.js +0 -10
  430. data/vendor/moment/src/locale/af.js +0 -71
  431. data/vendor/moment/src/locale/ar-dz.js +0 -156
  432. data/vendor/moment/src/locale/ar-kw.js +0 -54
  433. data/vendor/moment/src/locale/ar-ly.js +0 -171
  434. data/vendor/moment/src/locale/ar-ma.js +0 -55
  435. data/vendor/moment/src/locale/ar-sa.js +0 -104
  436. data/vendor/moment/src/locale/ar-tn.js +0 -54
  437. data/vendor/moment/src/locale/ar.js +0 -189
  438. data/vendor/moment/src/locale/az.js +0 -101
  439. data/vendor/moment/src/locale/be.js +0 -141
  440. data/vendor/moment/src/locale/bg.js +0 -87
  441. data/vendor/moment/src/locale/bm.js +0 -52
  442. data/vendor/moment/src/locale/bn-bd.js +0 -128
  443. data/vendor/moment/src/locale/bn.js +0 -118
  444. data/vendor/moment/src/locale/bo.js +0 -122
  445. data/vendor/moment/src/locale/br.js +0 -165
  446. data/vendor/moment/src/locale/bs.js +0 -149
  447. data/vendor/moment/src/locale/ca.js +0 -97
  448. data/vendor/moment/src/locale/cs.js +0 -171
  449. data/vendor/moment/src/locale/cv.js +0 -62
  450. data/vendor/moment/src/locale/cy.js +0 -97
  451. data/vendor/moment/src/locale/da.js +0 -53
  452. data/vendor/moment/src/locale/de-at.js +0 -79
  453. data/vendor/moment/src/locale/de-ch.js +0 -78
  454. data/vendor/moment/src/locale/de.js +0 -78
  455. data/vendor/moment/src/locale/dv.js +0 -90
  456. data/vendor/moment/src/locale/el.js +0 -104
  457. data/vendor/moment/src/locale/en-au.js +0 -68
  458. data/vendor/moment/src/locale/en-ca.js +0 -64
  459. data/vendor/moment/src/locale/en-gb.js +0 -68
  460. data/vendor/moment/src/locale/en-ie.js +0 -68
  461. data/vendor/moment/src/locale/en-il.js +0 -64
  462. data/vendor/moment/src/locale/en-in.js +0 -68
  463. data/vendor/moment/src/locale/en-nz.js +0 -68
  464. data/vendor/moment/src/locale/en-sg.js +0 -68
  465. data/vendor/moment/src/locale/eo.js +0 -68
  466. data/vendor/moment/src/locale/es-do.js +0 -104
  467. data/vendor/moment/src/locale/es-mx.js +0 -106
  468. data/vendor/moment/src/locale/es-us.js +0 -106
  469. data/vendor/moment/src/locale/es.js +0 -106
  470. data/vendor/moment/src/locale/et.js +0 -78
  471. data/vendor/moment/src/locale/eu.js +0 -63
  472. data/vendor/moment/src/locale/fa.js +0 -110
  473. data/vendor/moment/src/locale/fi.js +0 -121
  474. data/vendor/moment/src/locale/fil.js +0 -58
  475. data/vendor/moment/src/locale/fo.js +0 -56
  476. data/vendor/moment/src/locale/fr-ca.js +0 -69
  477. data/vendor/moment/src/locale/fr-ch.js +0 -73
  478. data/vendor/moment/src/locale/fr.js +0 -104
  479. data/vendor/moment/src/locale/fy.js +0 -77
  480. data/vendor/moment/src/locale/ga.js +0 -95
  481. data/vendor/moment/src/locale/gd.js +0 -95
  482. data/vendor/moment/src/locale/gl.js +0 -74
  483. data/vendor/moment/src/locale/gom-deva.js +0 -124
  484. data/vendor/moment/src/locale/gom-latn.js +0 -124
  485. data/vendor/moment/src/locale/gu.js +0 -121
  486. data/vendor/moment/src/locale/he.js +0 -94
  487. data/vendor/moment/src/locale/hi.js +0 -119
  488. data/vendor/moment/src/locale/hr.js +0 -154
  489. data/vendor/moment/src/locale/hu.js +0 -118
  490. data/vendor/moment/src/locale/hy-am.js +0 -92
  491. data/vendor/moment/src/locale/id.js +0 -76
  492. data/vendor/moment/src/locale/is.js +0 -139
  493. data/vendor/moment/src/locale/it-ch.js +0 -64
  494. data/vendor/moment/src/locale/it.js +0 -106
  495. data/vendor/moment/src/locale/ja.js +0 -148
  496. data/vendor/moment/src/locale/jv.js +0 -76
  497. data/vendor/moment/src/locale/ka.js +0 -92
  498. data/vendor/moment/src/locale/kk.js +0 -82
  499. data/vendor/moment/src/locale/km.js +0 -102
  500. data/vendor/moment/src/locale/kn.js +0 -123
  501. data/vendor/moment/src/locale/ko.js +0 -75
  502. data/vendor/moment/src/locale/ku.js +0 -118
  503. data/vendor/moment/src/locale/ky.js +0 -84
  504. data/vendor/moment/src/locale/lb.js +0 -135
  505. data/vendor/moment/src/locale/lo.js +0 -65
  506. data/vendor/moment/src/locale/lt.js +0 -123
  507. data/vendor/moment/src/locale/lv.js +0 -93
  508. data/vendor/moment/src/locale/me.js +0 -118
  509. data/vendor/moment/src/locale/mi.js +0 -59
  510. data/vendor/moment/src/locale/mk.js +0 -85
  511. data/vendor/moment/src/locale/ml.js +0 -80
  512. data/vendor/moment/src/locale/mn.js +0 -99
  513. data/vendor/moment/src/locale/mr.js +0 -202
  514. data/vendor/moment/src/locale/ms-my.js +0 -76
  515. data/vendor/moment/src/locale/ms.js +0 -75
  516. data/vendor/moment/src/locale/mt.js +0 -55
  517. data/vendor/moment/src/locale/my.js +0 -91
  518. data/vendor/moment/src/locale/nb.js +0 -61
  519. data/vendor/moment/src/locale/ne.js +0 -120
  520. data/vendor/moment/src/locale/nl-be.js +0 -102
  521. data/vendor/moment/src/locale/nl.js +0 -104
  522. data/vendor/moment/src/locale/nn.js +0 -60
  523. data/vendor/moment/src/locale/oc-lnc.js +0 -83
  524. data/vendor/moment/src/locale/pa-in.js +0 -121
  525. data/vendor/moment/src/locale/pl.js +0 -139
  526. data/vendor/moment/src/locale/pt-br.js +0 -57
  527. data/vendor/moment/src/locale/pt.js +0 -62
  528. data/vendor/moment/src/locale/ro.js +0 -75
  529. data/vendor/moment/src/locale/ru.js +0 -206
  530. data/vendor/moment/src/locale/sd.js +0 -81
  531. data/vendor/moment/src/locale/se.js +0 -57
  532. data/vendor/moment/src/locale/si.js +0 -68
  533. data/vendor/moment/src/locale/sk.js +0 -144
  534. data/vendor/moment/src/locale/sl.js +0 -170
  535. data/vendor/moment/src/locale/sq.js +0 -65
  536. data/vendor/moment/src/locale/sr-cyrl.js +0 -116
  537. data/vendor/moment/src/locale/sr.js +0 -118
  538. data/vendor/moment/src/locale/ss.js +0 -83
  539. data/vendor/moment/src/locale/sv.js +0 -68
  540. data/vendor/moment/src/locale/sw.js +0 -54
  541. data/vendor/moment/src/locale/ta.js +0 -129
  542. data/vendor/moment/src/locale/te.js +0 -86
  543. data/vendor/moment/src/locale/tet.js +0 -68
  544. data/vendor/moment/src/locale/tg.js +0 -116
  545. data/vendor/moment/src/locale/th.js +0 -64
  546. data/vendor/moment/src/locale/tk.js +0 -91
  547. data/vendor/moment/src/locale/tl-ph.js +0 -57
  548. data/vendor/moment/src/locale/tlh.js +0 -125
  549. data/vendor/moment/src/locale/tr.js +0 -106
  550. data/vendor/moment/src/locale/tzl.js +0 -89
  551. data/vendor/moment/src/locale/tzm-latn.js +0 -53
  552. data/vendor/moment/src/locale/tzm.js +0 -53
  553. data/vendor/moment/src/locale/ug-cn.js +0 -110
  554. data/vendor/moment/src/locale/uk.js +0 -163
  555. data/vendor/moment/src/locale/ur.js +0 -82
  556. data/vendor/moment/src/locale/uz-latn.js +0 -53
  557. data/vendor/moment/src/locale/uz.js +0 -51
  558. data/vendor/moment/src/locale/vi.js +0 -79
  559. data/vendor/moment/src/locale/x-pseudo.js +0 -71
  560. data/vendor/moment/src/locale/yo.js +0 -53
  561. data/vendor/moment/src/locale/zh-cn.js +0 -120
  562. data/vendor/moment/src/locale/zh-hk.js +0 -101
  563. data/vendor/moment/src/locale/zh-mo.js +0 -100
  564. data/vendor/moment/src/locale/zh-tw.js +0 -99
  565. data/vendor/moment/src/moment.js +0 -93
  566. data/vendor/moment/src/test/helpers/common-locale.js +0 -265
  567. data/vendor/moment/src/test/helpers/deprecation-handler.js +0 -62
  568. data/vendor/moment/src/test/helpers/dst.js +0 -8
  569. data/vendor/moment/src/test/helpers/each-own-prop.js +0 -8
  570. data/vendor/moment/src/test/helpers/each.js +0 -8
  571. data/vendor/moment/src/test/helpers/has-own-prop.js +0 -3
  572. data/vendor/moment/src/test/helpers/object-keys.js +0 -17
  573. data/vendor/moment/src/test/locale/af.js +0 -446
  574. data/vendor/moment/src/test/locale/ar-dz.js +0 -482
  575. data/vendor/moment/src/test/locale/ar-kw.js +0 -446
  576. data/vendor/moment/src/test/locale/ar-ly.js +0 -521
  577. data/vendor/moment/src/test/locale/ar-ma.js +0 -446
  578. data/vendor/moment/src/test/locale/ar-sa.js +0 -465
  579. data/vendor/moment/src/test/locale/ar-tn.js +0 -611
  580. data/vendor/moment/src/test/locale/ar.js +0 -521
  581. data/vendor/moment/src/test/locale/az.js +0 -453
  582. data/vendor/moment/src/test/locale/be.js +0 -575
  583. data/vendor/moment/src/test/locale/bg.js +0 -459
  584. data/vendor/moment/src/test/locale/bm.js +0 -408
  585. data/vendor/moment/src/test/locale/bn-bd.js +0 -473
  586. data/vendor/moment/src/test/locale/bn.js +0 -481
  587. data/vendor/moment/src/test/locale/bo.js +0 -501
  588. data/vendor/moment/src/test/locale/br.js +0 -541
  589. data/vendor/moment/src/test/locale/bs.js +0 -478
  590. data/vendor/moment/src/test/locale/ca.js +0 -472
  591. data/vendor/moment/src/test/locale/cs.js +0 -635
  592. data/vendor/moment/src/test/locale/cv.js +0 -459
  593. data/vendor/moment/src/test/locale/cy.js +0 -444
  594. data/vendor/moment/src/test/locale/da.js +0 -447
  595. data/vendor/moment/src/test/locale/de-at.js +0 -476
  596. data/vendor/moment/src/test/locale/de-ch.js +0 -481
  597. data/vendor/moment/src/test/locale/de.js +0 -480
  598. data/vendor/moment/src/test/locale/dv.js +0 -419
  599. data/vendor/moment/src/test/locale/el.js +0 -544
  600. data/vendor/moment/src/test/locale/en-au.js +0 -480
  601. data/vendor/moment/src/test/locale/en-ca.js +0 -451
  602. data/vendor/moment/src/test/locale/en-gb.js +0 -446
  603. data/vendor/moment/src/test/locale/en-ie.js +0 -446
  604. data/vendor/moment/src/test/locale/en-il.js +0 -454
  605. data/vendor/moment/src/test/locale/en-in.js +0 -464
  606. data/vendor/moment/src/test/locale/en-nz.js +0 -446
  607. data/vendor/moment/src/test/locale/en-sg.js +0 -430
  608. data/vendor/moment/src/test/locale/en.js +0 -562
  609. data/vendor/moment/src/test/locale/eo.js +0 -455
  610. data/vendor/moment/src/test/locale/es-do.js +0 -473
  611. data/vendor/moment/src/test/locale/es-mx.js +0 -514
  612. data/vendor/moment/src/test/locale/es-us.js +0 -489
  613. data/vendor/moment/src/test/locale/es.js +0 -476
  614. data/vendor/moment/src/test/locale/et.js +0 -533
  615. data/vendor/moment/src/test/locale/eu.js +0 -445
  616. data/vendor/moment/src/test/locale/fa.js +0 -461
  617. data/vendor/moment/src/test/locale/fi.js +0 -489
  618. data/vendor/moment/src/test/locale/fil.js +0 -448
  619. data/vendor/moment/src/test/locale/fo.js +0 -454
  620. data/vendor/moment/src/test/locale/fr-ca.js +0 -460
  621. data/vendor/moment/src/test/locale/fr-ch.js +0 -460
  622. data/vendor/moment/src/test/locale/fr.js +0 -482
  623. data/vendor/moment/src/test/locale/fy.js +0 -461
  624. data/vendor/moment/src/test/locale/ga.js +0 -445
  625. data/vendor/moment/src/test/locale/gd.js +0 -464
  626. data/vendor/moment/src/test/locale/gl.js +0 -466
  627. data/vendor/moment/src/test/locale/gom-deva.js +0 -445
  628. data/vendor/moment/src/test/locale/gom-latn.js +0 -459
  629. data/vendor/moment/src/test/locale/gu.js +0 -487
  630. data/vendor/moment/src/test/locale/he.js +0 -417
  631. data/vendor/moment/src/test/locale/hi.js +0 -484
  632. data/vendor/moment/src/test/locale/hr.js +0 -478
  633. data/vendor/moment/src/test/locale/hu.js +0 -468
  634. data/vendor/moment/src/test/locale/hy-am.js +0 -609
  635. data/vendor/moment/src/test/locale/id.js +0 -407
  636. data/vendor/moment/src/test/locale/is.js +0 -479
  637. data/vendor/moment/src/test/locale/it-ch.js +0 -427
  638. data/vendor/moment/src/test/locale/it.js +0 -479
  639. data/vendor/moment/src/test/locale/ja.js +0 -591
  640. data/vendor/moment/src/test/locale/jv.js +0 -418
  641. data/vendor/moment/src/test/locale/ka.js +0 -452
  642. data/vendor/moment/src/test/locale/kk.js +0 -445
  643. data/vendor/moment/src/test/locale/km.js +0 -471
  644. data/vendor/moment/src/test/locale/kn.js +0 -493
  645. data/vendor/moment/src/test/locale/ko.js +0 -496
  646. data/vendor/moment/src/test/locale/ku.js +0 -465
  647. data/vendor/moment/src/test/locale/ky.js +0 -445
  648. data/vendor/moment/src/test/locale/lb.js +0 -432
  649. data/vendor/moment/src/test/locale/lo.js +0 -445
  650. data/vendor/moment/src/test/locale/lt.js +0 -504
  651. data/vendor/moment/src/test/locale/lv.js +0 -567
  652. data/vendor/moment/src/test/locale/me.js +0 -481
  653. data/vendor/moment/src/test/locale/mi.js +0 -450
  654. data/vendor/moment/src/test/locale/mk.js +0 -460
  655. data/vendor/moment/src/test/locale/ml.js +0 -497
  656. data/vendor/moment/src/test/locale/mn.js +0 -555
  657. data/vendor/moment/src/test/locale/mr.js +0 -497
  658. data/vendor/moment/src/test/locale/ms-my.js +0 -454
  659. data/vendor/moment/src/test/locale/ms.js +0 -454
  660. data/vendor/moment/src/test/locale/mt.js +0 -446
  661. data/vendor/moment/src/test/locale/my.js +0 -616
  662. data/vendor/moment/src/test/locale/nb.js +0 -446
  663. data/vendor/moment/src/test/locale/ne.js +0 -484
  664. data/vendor/moment/src/test/locale/nl-be.js +0 -471
  665. data/vendor/moment/src/test/locale/nl.js +0 -471
  666. data/vendor/moment/src/test/locale/nn.js +0 -445
  667. data/vendor/moment/src/test/locale/oc-lnc.js +0 -440
  668. data/vendor/moment/src/test/locale/pa-in.js +0 -769
  669. data/vendor/moment/src/test/locale/pl.js +0 -557
  670. data/vendor/moment/src/test/locale/pt-br.js +0 -472
  671. data/vendor/moment/src/test/locale/pt.js +0 -449
  672. data/vendor/moment/src/test/locale/ro.js +0 -485
  673. data/vendor/moment/src/test/locale/ru.js +0 -706
  674. data/vendor/moment/src/test/locale/sd.js +0 -434
  675. data/vendor/moment/src/test/locale/se.js +0 -456
  676. data/vendor/moment/src/test/locale/si.js +0 -422
  677. data/vendor/moment/src/test/locale/sk.js +0 -640
  678. data/vendor/moment/src/test/locale/sl.js +0 -816
  679. data/vendor/moment/src/test/locale/sq.js +0 -457
  680. data/vendor/moment/src/test/locale/sr-cyrl.js +0 -478
  681. data/vendor/moment/src/test/locale/sr.js +0 -478
  682. data/vendor/moment/src/test/locale/ss.js +0 -510
  683. data/vendor/moment/src/test/locale/sv.js +0 -441
  684. data/vendor/moment/src/test/locale/sw.js +0 -449
  685. data/vendor/moment/src/test/locale/ta.js +0 -452
  686. data/vendor/moment/src/test/locale/te.js +0 -497
  687. data/vendor/moment/src/test/locale/tet.js +0 -446
  688. data/vendor/moment/src/test/locale/tg.js +0 -462
  689. data/vendor/moment/src/test/locale/th.js +0 -408
  690. data/vendor/moment/src/test/locale/tk.js +0 -445
  691. data/vendor/moment/src/test/locale/tl-ph.js +0 -448
  692. data/vendor/moment/src/test/locale/tlh.js +0 -484
  693. data/vendor/moment/src/test/locale/tr.js +0 -461
  694. data/vendor/moment/src/test/locale/tzl.js +0 -453
  695. data/vendor/moment/src/test/locale/tzm-latn.js +0 -449
  696. data/vendor/moment/src/test/locale/tzm.js +0 -449
  697. data/vendor/moment/src/test/locale/ug-cn.js +0 -427
  698. data/vendor/moment/src/test/locale/uk.js +0 -521
  699. data/vendor/moment/src/test/locale/ur.js +0 -439
  700. data/vendor/moment/src/test/locale/uz-latn.js +0 -450
  701. data/vendor/moment/src/test/locale/uz.js +0 -447
  702. data/vendor/moment/src/test/locale/vi.js +0 -452
  703. data/vendor/moment/src/test/locale/x-pseudo.js +0 -446
  704. data/vendor/moment/src/test/locale/yo.js +0 -447
  705. data/vendor/moment/src/test/locale/zh-cn.js +0 -459
  706. data/vendor/moment/src/test/locale/zh-hk.js +0 -443
  707. data/vendor/moment/src/test/locale/zh-mo.js +0 -427
  708. data/vendor/moment/src/test/locale/zh-tw.js +0 -443
  709. data/vendor/moment/src/test/moment/add_subtract.js +0 -545
  710. data/vendor/moment/src/test/moment/calendar.js +0 -214
  711. data/vendor/moment/src/test/moment/create.js +0 -2816
  712. data/vendor/moment/src/test/moment/creation-data.js +0 -40
  713. data/vendor/moment/src/test/moment/days_in_month.js +0 -122
  714. data/vendor/moment/src/test/moment/days_in_year.js +0 -11
  715. data/vendor/moment/src/test/moment/deprecate.js +0 -14
  716. data/vendor/moment/src/test/moment/diff.js +0 -624
  717. data/vendor/moment/src/test/moment/duration.js +0 -2024
  718. data/vendor/moment/src/test/moment/duration_from_moments.js +0 -53
  719. data/vendor/moment/src/test/moment/duration_invalid.js +0 -145
  720. data/vendor/moment/src/test/moment/format.js +0 -951
  721. data/vendor/moment/src/test/moment/from_to.js +0 -148
  722. data/vendor/moment/src/test/moment/getters_setters.js +0 -504
  723. data/vendor/moment/src/test/moment/instanceof.js +0 -42
  724. data/vendor/moment/src/test/moment/invalid.js +0 -212
  725. data/vendor/moment/src/test/moment/is-leap-year.js +0 -89
  726. data/vendor/moment/src/test/moment/is_after.js +0 -674
  727. data/vendor/moment/src/test/moment/is_array.js +0 -18
  728. data/vendor/moment/src/test/moment/is_before.js +0 -674
  729. data/vendor/moment/src/test/moment/is_between.js +0 -1082
  730. data/vendor/moment/src/test/moment/is_date.js +0 -32
  731. data/vendor/moment/src/test/moment/is_moment.js +0 -52
  732. data/vendor/moment/src/test/moment/is_number.js +0 -27
  733. data/vendor/moment/src/test/moment/is_same.js +0 -554
  734. data/vendor/moment/src/test/moment/is_same_or_after.js +0 -777
  735. data/vendor/moment/src/test/moment/is_same_or_before.js +0 -777
  736. data/vendor/moment/src/test/moment/is_valid.js +0 -563
  737. data/vendor/moment/src/test/moment/leapyear.js +0 -11
  738. data/vendor/moment/src/test/moment/listers.js +0 -172
  739. data/vendor/moment/src/test/moment/locale.js +0 -1029
  740. data/vendor/moment/src/test/moment/locale_inheritance.js +0 -332
  741. data/vendor/moment/src/test/moment/locale_update.js +0 -321
  742. data/vendor/moment/src/test/moment/min_max.js +0 -72
  743. data/vendor/moment/src/test/moment/mutable.js +0 -26
  744. data/vendor/moment/src/test/moment/normalize_units.js +0 -83
  745. data/vendor/moment/src/test/moment/now.js +0 -100
  746. data/vendor/moment/src/test/moment/parsing_flags.js +0 -434
  747. data/vendor/moment/src/test/moment/preparse_postformat.js +0 -121
  748. data/vendor/moment/src/test/moment/quarter.js +0 -117
  749. data/vendor/moment/src/test/moment/relative_time.js +0 -424
  750. data/vendor/moment/src/test/moment/start_end_of.js +0 -538
  751. data/vendor/moment/src/test/moment/string_prototype.js +0 -17
  752. data/vendor/moment/src/test/moment/to_type.js +0 -53
  753. data/vendor/moment/src/test/moment/utc.js +0 -138
  754. data/vendor/moment/src/test/moment/utc_offset.js +0 -894
  755. data/vendor/moment/src/test/moment/week_year.js +0 -1075
  756. data/vendor/moment/src/test/moment/weekday.js +0 -470
  757. data/vendor/moment/src/test/moment/weeks.js +0 -861
  758. data/vendor/moment/src/test/moment/weeks_in_year.js +0 -224
  759. data/vendor/moment/src/test/moment/zone_switching.js +0 -160
  760. data/vendor/moment/src/test/moment/zones.js +0 -840
  761. data/vendor/moment/src/test/qunit-locale.js +0 -32
  762. data/vendor/moment/src/test/qunit.js +0 -31
  763. data/vendor/moment/tasks/bump_version.js +0 -81
  764. data/vendor/moment/tasks/check_sauce_creds.js +0 -13
  765. data/vendor/moment/tasks/component.js +0 -13
  766. data/vendor/moment/tasks/nuget.js +0 -50
  767. data/vendor/moment/tasks/qtest.js +0 -56
  768. data/vendor/moment/tasks/transpile.js +0 -362
  769. data/vendor/moment/tasks/update_index.js +0 -32
  770. data/vendor/moment/templates/default.js +0 -5
  771. data/vendor/moment/templates/empty.js +0 -0
  772. data/vendor/moment/templates/locale-header.js +0 -6
  773. data/vendor/moment/templates/test-header.js +0 -6
  774. data/vendor/moment/ts3.1-typing-tests/moment-tests.ts +0 -547
  775. data/vendor/moment/ts3.1-typing-tests/tsconfig.json +0 -14
  776. data/vendor/moment/ts3.1-typings/moment.d.ts +0 -785
  777. data/vendor/moment/typing-tests/moment-tests.ts +0 -557
  778. data/vendor/moment/typing-tests/tsconfig.json +0 -12
  779. data/vendor/tempusdominus/CONTRIBUTING.md +0 -38
  780. data/vendor/tempusdominus/Gruntfile.js +0 -188
  781. data/vendor/tempusdominus/LICENSE +0 -21
  782. data/vendor/tempusdominus/README.md +0 -30
  783. data/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.css +0 -206
  784. data/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.min.css +0 -206
  785. data/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.js +0 -2779
  786. data/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.min.js +0 -7
  787. data/vendor/tempusdominus/composer.json +0 -29
  788. data/vendor/tempusdominus/docs/Changelog/index.html +0 -189
  789. data/vendor/tempusdominus/docs/ContributorsGuide/index.html +0 -290
  790. data/vendor/tempusdominus/docs/Events/index.html +0 -244
  791. data/vendor/tempusdominus/docs/Extras/index.html +0 -210
  792. data/vendor/tempusdominus/docs/FAQ/index.html +0 -186
  793. data/vendor/tempusdominus/docs/Functions/index.html +0 -239
  794. data/vendor/tempusdominus/docs/Installing/index.html +0 -233
  795. data/vendor/tempusdominus/docs/Options/index.html +0 -862
  796. data/vendor/tempusdominus/docs/Usage/index.html +0 -853
  797. data/vendor/tempusdominus/docs/android-chrome-192x192.png +0 -0
  798. data/vendor/tempusdominus/docs/android-chrome-256x256.png +0 -0
  799. data/vendor/tempusdominus/docs/apple-touch-icon.png +0 -0
  800. data/vendor/tempusdominus/docs/browserconfig.xml +0 -9
  801. data/vendor/tempusdominus/docs/css/base.css +0 -1705
  802. data/vendor/tempusdominus/docs/css/tempusdominus-bootstrap-4.css +0 -206
  803. data/vendor/tempusdominus/docs/favicon-16x16.png +0 -0
  804. data/vendor/tempusdominus/docs/favicon-32x32.png +0 -0
  805. data/vendor/tempusdominus/docs/favicon.ico +0 -0
  806. data/vendor/tempusdominus/docs/index.html +0 -208
  807. data/vendor/tempusdominus/docs/js/base.js +0 -62
  808. data/vendor/tempusdominus/docs/js/tempusdominus-bootstrap-4.js +0 -2779
  809. data/vendor/tempusdominus/docs/manifest.json +0 -18
  810. data/vendor/tempusdominus/docs/mstile-150x150.png +0 -0
  811. data/vendor/tempusdominus/docs/safari-pinned-tab.svg +0 -18
  812. data/vendor/tempusdominus/docs/search/lunr.min.js +0 -7
  813. data/vendor/tempusdominus/docs/search/mustache.min.js +0 -1
  814. data/vendor/tempusdominus/docs/search/require.js +0 -36
  815. data/vendor/tempusdominus/docs/search/search-results-template.mustache +0 -4
  816. data/vendor/tempusdominus/docs/search/search.js +0 -92
  817. data/vendor/tempusdominus/docs/search/search_index.json +0 -1084
  818. data/vendor/tempusdominus/docs/search/text.js +0 -390
  819. data/vendor/tempusdominus/docs/sitemap.xml +0 -84
  820. data/vendor/tempusdominus/docs/theme/404.html +0 -12
  821. data/vendor/tempusdominus/docs/theme/android-chrome-192x192.png +0 -0
  822. data/vendor/tempusdominus/docs/theme/android-chrome-256x256.png +0 -0
  823. data/vendor/tempusdominus/docs/theme/apple-touch-icon.png +0 -0
  824. data/vendor/tempusdominus/docs/theme/base.html +0 -105
  825. data/vendor/tempusdominus/docs/theme/browserconfig.xml +0 -9
  826. data/vendor/tempusdominus/docs/theme/content.html +0 -8
  827. data/vendor/tempusdominus/docs/theme/css/base.css +0 -1705
  828. data/vendor/tempusdominus/docs/theme/css/tempusdominus-bootstrap-4.css +0 -206
  829. data/vendor/tempusdominus/docs/theme/favicon-16x16.png +0 -0
  830. data/vendor/tempusdominus/docs/theme/favicon-32x32.png +0 -0
  831. data/vendor/tempusdominus/docs/theme/favicon.ico +0 -0
  832. data/vendor/tempusdominus/docs/theme/js/base.js +0 -62
  833. data/vendor/tempusdominus/docs/theme/js/tempusdominus-bootstrap-4.js +0 -2779
  834. data/vendor/tempusdominus/docs/theme/main.html +0 -1
  835. data/vendor/tempusdominus/docs/theme/manifest.json +0 -18
  836. data/vendor/tempusdominus/docs/theme/mstile-150x150.png +0 -0
  837. data/vendor/tempusdominus/docs/theme/nav.html +0 -32
  838. data/vendor/tempusdominus/docs/theme/safari-pinned-tab.svg +0 -18
  839. data/vendor/tempusdominus/docs/theme/search-modal.html +0 -24
  840. data/vendor/tempusdominus/docs/theme/toc.html +0 -13
  841. data/vendor/tempusdominus/eslintrc.json +0 -125
  842. data/vendor/tempusdominus/mkdocs.yml +0 -19
  843. data/vendor/tempusdominus/package-lock.json +0 -6426
  844. data/vendor/tempusdominus/package.json +0 -79
  845. data/vendor/tempusdominus/src/docs/ChangeLog.md +0 -20
  846. data/vendor/tempusdominus/src/docs/ContributorsGuide.md +0 -85
  847. data/vendor/tempusdominus/src/docs/Events.md +0 -95
  848. data/vendor/tempusdominus/src/docs/Extras.md +0 -49
  849. data/vendor/tempusdominus/src/docs/FAQ.md +0 -22
  850. data/vendor/tempusdominus/src/docs/Functions.md +0 -82
  851. data/vendor/tempusdominus/src/docs/Installing.md +0 -67
  852. data/vendor/tempusdominus/src/docs/Options.md +0 -940
  853. data/vendor/tempusdominus/src/docs/Usage.md +0 -724
  854. data/vendor/tempusdominus/src/docs/index.md +0 -53
  855. data/vendor/tempusdominus/src/docs/theme/404.html +0 -12
  856. data/vendor/tempusdominus/src/docs/theme/android-chrome-192x192.png +0 -0
  857. data/vendor/tempusdominus/src/docs/theme/android-chrome-256x256.png +0 -0
  858. data/vendor/tempusdominus/src/docs/theme/apple-touch-icon.png +0 -0
  859. data/vendor/tempusdominus/src/docs/theme/base.html +0 -105
  860. data/vendor/tempusdominus/src/docs/theme/browserconfig.xml +0 -9
  861. data/vendor/tempusdominus/src/docs/theme/content.html +0 -8
  862. data/vendor/tempusdominus/src/docs/theme/css/base.css +0 -1705
  863. data/vendor/tempusdominus/src/docs/theme/css/tempusdominus-bootstrap-4.css +0 -206
  864. data/vendor/tempusdominus/src/docs/theme/favicon-16x16.png +0 -0
  865. data/vendor/tempusdominus/src/docs/theme/favicon-32x32.png +0 -0
  866. data/vendor/tempusdominus/src/docs/theme/favicon.ico +0 -0
  867. data/vendor/tempusdominus/src/docs/theme/js/base.js +0 -62
  868. data/vendor/tempusdominus/src/docs/theme/js/tempusdominus-bootstrap-4.js +0 -2779
  869. data/vendor/tempusdominus/src/docs/theme/main.html +0 -1
  870. data/vendor/tempusdominus/src/docs/theme/manifest.json +0 -18
  871. data/vendor/tempusdominus/src/docs/theme/mstile-150x150.png +0 -0
  872. data/vendor/tempusdominus/src/docs/theme/nav.html +0 -32
  873. data/vendor/tempusdominus/src/docs/theme/safari-pinned-tab.svg +0 -18
  874. data/vendor/tempusdominus/src/docs/theme/search-modal.html +0 -24
  875. data/vendor/tempusdominus/src/docs/theme/toc.html +0 -13
  876. data/vendor/tempusdominus/src/js/tempusdominus-bootstrap-4.js +0 -1182
  877. data/vendor/tempusdominus/src/sass/_tempusdominus-bootstrap-4.scss +0 -342
  878. data/vendor/tempusdominus/src/sass/tempusdominus-bootstrap-4-build.scss +0 -17
  879. data/vendor/tempusdominus/tasks/bump_version.js +0 -75
@@ -1,2779 +0,0 @@
1
- /*@preserve
2
- * Tempus Dominus Bootstrap4 v5.1.2 (https://tempusdominus.github.io/bootstrap-4/)
3
- * Copyright 2016-2018 Jonathan Peterson
4
- * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
5
- */
6
-
7
- if (typeof jQuery === 'undefined') {
8
- throw new Error('Tempus Dominus Bootstrap4\'s requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4\'s JavaScript.');
9
- }
10
-
11
- +function ($) {
12
- var version = $.fn.jquery.split(' ')[0].split('.');
13
- if ((version[0] < 2 && version[1] < 9) || (version[0] === 1 && version[1] === 9 && version[2] < 1) || (version[0] >= 4)) {
14
- throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0');
15
- }
16
- }(jQuery);
17
-
18
-
19
- if (typeof moment === 'undefined') {
20
- throw new Error('Tempus Dominus Bootstrap4\'s requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4\'s JavaScript.');
21
- }
22
-
23
- var version = moment.version.split('.')
24
- if ((version[0] <= 2 && version[1] < 17) || (version[0] >= 3)) {
25
- throw new Error('Tempus Dominus Bootstrap4\'s requires at least moment.js v2.17.0 but less than v3.0.0');
26
- }
27
-
28
- +function () {
29
-
30
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
31
-
32
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
33
-
34
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
35
-
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
37
-
38
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
-
40
- // ReSharper disable once InconsistentNaming
41
- var DateTimePicker = function ($, moment) {
42
- // ReSharper disable InconsistentNaming
43
- var NAME = 'datetimepicker',
44
- DATA_KEY = '' + NAME,
45
- EVENT_KEY = '.' + DATA_KEY,
46
- DATA_API_KEY = '.data-api',
47
- Selector = {
48
- DATA_TOGGLE: '[data-toggle="' + DATA_KEY + '"]'
49
- },
50
- ClassName = {
51
- INPUT: NAME + '-input'
52
- },
53
- Event = {
54
- CHANGE: 'change' + EVENT_KEY,
55
- BLUR: 'blur' + EVENT_KEY,
56
- KEYUP: 'keyup' + EVENT_KEY,
57
- KEYDOWN: 'keydown' + EVENT_KEY,
58
- FOCUS: 'focus' + EVENT_KEY,
59
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
60
- //emitted
61
- UPDATE: 'update' + EVENT_KEY,
62
- ERROR: 'error' + EVENT_KEY,
63
- HIDE: 'hide' + EVENT_KEY,
64
- SHOW: 'show' + EVENT_KEY
65
- },
66
- DatePickerModes = [{
67
- CLASS_NAME: 'days',
68
- NAV_FUNCTION: 'M',
69
- NAV_STEP: 1
70
- }, {
71
- CLASS_NAME: 'months',
72
- NAV_FUNCTION: 'y',
73
- NAV_STEP: 1
74
- }, {
75
- CLASS_NAME: 'years',
76
- NAV_FUNCTION: 'y',
77
- NAV_STEP: 10
78
- }, {
79
- CLASS_NAME: 'decades',
80
- NAV_FUNCTION: 'y',
81
- NAV_STEP: 100
82
- }],
83
- KeyMap = {
84
- 'up': 38,
85
- 38: 'up',
86
- 'down': 40,
87
- 40: 'down',
88
- 'left': 37,
89
- 37: 'left',
90
- 'right': 39,
91
- 39: 'right',
92
- 'tab': 9,
93
- 9: 'tab',
94
- 'escape': 27,
95
- 27: 'escape',
96
- 'enter': 13,
97
- 13: 'enter',
98
- 'pageUp': 33,
99
- 33: 'pageUp',
100
- 'pageDown': 34,
101
- 34: 'pageDown',
102
- 'shift': 16,
103
- 16: 'shift',
104
- 'control': 17,
105
- 17: 'control',
106
- 'space': 32,
107
- 32: 'space',
108
- 't': 84,
109
- 84: 't',
110
- 'delete': 46,
111
- 46: 'delete'
112
- },
113
- ViewModes = ['times', 'days', 'months', 'years', 'decades'],
114
- keyState = {},
115
- keyPressHandled = {};
116
-
117
- var Default = {
118
- timeZone: '',
119
- format: false,
120
- dayViewHeaderFormat: 'MMMM YYYY',
121
- extraFormats: false,
122
- stepping: 1,
123
- minDate: false,
124
- maxDate: false,
125
- useCurrent: true,
126
- collapse: true,
127
- locale: moment.locale(),
128
- defaultDate: false,
129
- disabledDates: false,
130
- enabledDates: false,
131
- icons: {
132
- time: 'fa fa-clock-o',
133
- date: 'fa fa-calendar',
134
- up: 'fa fa-arrow-up',
135
- down: 'fa fa-arrow-down',
136
- previous: 'fa fa-chevron-left',
137
- next: 'fa fa-chevron-right',
138
- today: 'fa fa-calendar-check-o',
139
- clear: 'fa fa-delete',
140
- close: 'fa fa-times'
141
- },
142
- tooltips: {
143
- today: 'Go to today',
144
- clear: 'Clear selection',
145
- close: 'Close the picker',
146
- selectMonth: 'Select Month',
147
- prevMonth: 'Previous Month',
148
- nextMonth: 'Next Month',
149
- selectYear: 'Select Year',
150
- prevYear: 'Previous Year',
151
- nextYear: 'Next Year',
152
- selectDecade: 'Select Decade',
153
- prevDecade: 'Previous Decade',
154
- nextDecade: 'Next Decade',
155
- prevCentury: 'Previous Century',
156
- nextCentury: 'Next Century',
157
- pickHour: 'Pick Hour',
158
- incrementHour: 'Increment Hour',
159
- decrementHour: 'Decrement Hour',
160
- pickMinute: 'Pick Minute',
161
- incrementMinute: 'Increment Minute',
162
- decrementMinute: 'Decrement Minute',
163
- pickSecond: 'Pick Second',
164
- incrementSecond: 'Increment Second',
165
- decrementSecond: 'Decrement Second',
166
- togglePeriod: 'Toggle Period',
167
- selectTime: 'Select Time',
168
- selectDate: 'Select Date'
169
- },
170
- useStrict: false,
171
- sideBySide: false,
172
- daysOfWeekDisabled: false,
173
- calendarWeeks: false,
174
- viewMode: 'days',
175
- toolbarPlacement: 'default',
176
- buttons: {
177
- showToday: false,
178
- showClear: false,
179
- showClose: false
180
- },
181
- widgetPositioning: {
182
- horizontal: 'auto',
183
- vertical: 'auto'
184
- },
185
- widgetParent: null,
186
- ignoreReadonly: false,
187
- keepOpen: false,
188
- focusOnShow: true,
189
- inline: false,
190
- keepInvalid: false,
191
- keyBinds: {
192
- up: function up() {
193
- if (!this.widget) {
194
- return false;
195
- }
196
- var d = this._dates[0] || this.getMoment();
197
- if (this.widget.find('.datepicker').is(':visible')) {
198
- this.date(d.clone().subtract(7, 'd'));
199
- } else {
200
- this.date(d.clone().add(this.stepping(), 'm'));
201
- }
202
- return true;
203
- },
204
- down: function down() {
205
- if (!this.widget) {
206
- this.show();
207
- return false;
208
- }
209
- var d = this._dates[0] || this.getMoment();
210
- if (this.widget.find('.datepicker').is(':visible')) {
211
- this.date(d.clone().add(7, 'd'));
212
- } else {
213
- this.date(d.clone().subtract(this.stepping(), 'm'));
214
- }
215
- return true;
216
- },
217
- 'control up': function controlUp() {
218
- if (!this.widget) {
219
- return false;
220
- }
221
- var d = this._dates[0] || this.getMoment();
222
- if (this.widget.find('.datepicker').is(':visible')) {
223
- this.date(d.clone().subtract(1, 'y'));
224
- } else {
225
- this.date(d.clone().add(1, 'h'));
226
- }
227
- return true;
228
- },
229
- 'control down': function controlDown() {
230
- if (!this.widget) {
231
- return false;
232
- }
233
- var d = this._dates[0] || this.getMoment();
234
- if (this.widget.find('.datepicker').is(':visible')) {
235
- this.date(d.clone().add(1, 'y'));
236
- } else {
237
- this.date(d.clone().subtract(1, 'h'));
238
- }
239
- return true;
240
- },
241
- left: function left() {
242
- if (!this.widget) {
243
- return false;
244
- }
245
- var d = this._dates[0] || this.getMoment();
246
- if (this.widget.find('.datepicker').is(':visible')) {
247
- this.date(d.clone().subtract(1, 'd'));
248
- }
249
- return true;
250
- },
251
- right: function right() {
252
- if (!this.widget) {
253
- return false;
254
- }
255
- var d = this._dates[0] || this.getMoment();
256
- if (this.widget.find('.datepicker').is(':visible')) {
257
- this.date(d.clone().add(1, 'd'));
258
- }
259
- return true;
260
- },
261
- pageUp: function pageUp() {
262
- if (!this.widget) {
263
- return false;
264
- }
265
- var d = this._dates[0] || this.getMoment();
266
- if (this.widget.find('.datepicker').is(':visible')) {
267
- this.date(d.clone().subtract(1, 'M'));
268
- }
269
- return true;
270
- },
271
- pageDown: function pageDown() {
272
- if (!this.widget) {
273
- return false;
274
- }
275
- var d = this._dates[0] || this.getMoment();
276
- if (this.widget.find('.datepicker').is(':visible')) {
277
- this.date(d.clone().add(1, 'M'));
278
- }
279
- return true;
280
- },
281
- enter: function enter() {
282
- if (!this.widget) {
283
- return false;
284
- }
285
- this.hide();
286
- return true;
287
- },
288
- escape: function escape() {
289
- if (!this.widget) {
290
- return false;
291
- }
292
- this.hide();
293
- return true;
294
- },
295
- 'control space': function controlSpace() {
296
- if (!this.widget) {
297
- return false;
298
- }
299
- if (this.widget.find('.timepicker').is(':visible')) {
300
- this.widget.find('.btn[data-action="togglePeriod"]').click();
301
- }
302
- return true;
303
- },
304
- t: function t() {
305
- if (!this.widget) {
306
- return false;
307
- }
308
- this.date(this.getMoment());
309
- return true;
310
- },
311
- 'delete': function _delete() {
312
- if (!this.widget) {
313
- return false;
314
- }
315
- this.clear();
316
- return true;
317
- }
318
- },
319
- debug: false,
320
- allowInputToggle: false,
321
- disabledTimeIntervals: false,
322
- disabledHours: false,
323
- enabledHours: false,
324
- viewDate: false,
325
- allowMultidate: false,
326
- multidateSeparator: ','
327
- };
328
-
329
- // ReSharper restore InconsistentNaming
330
-
331
- // ReSharper disable once DeclarationHides
332
- // ReSharper disable once InconsistentNaming
333
-
334
- var DateTimePicker = function () {
335
- /** @namespace eData.dateOptions */
336
- /** @namespace moment.tz */
337
-
338
- function DateTimePicker(element, options) {
339
- _classCallCheck(this, DateTimePicker);
340
-
341
- this._options = this._getOptions(options);
342
- this._element = element;
343
- this._dates = [];
344
- this._datesFormatted = [];
345
- this._viewDate = null;
346
- this.unset = true;
347
- this.component = false;
348
- this.widget = false;
349
- this.use24Hours = null;
350
- this.actualFormat = null;
351
- this.parseFormats = null;
352
- this.currentViewMode = null;
353
- this.MinViewModeNumber = 0;
354
-
355
- this._int();
356
- }
357
-
358
- /**
359
- * @return {string}
360
- */
361
-
362
-
363
- //private
364
-
365
- DateTimePicker.prototype._int = function _int() {
366
- var targetInput = this._element.data('target-input');
367
- if (this._element.is('input')) {
368
- this.input = this._element;
369
- } else if (targetInput !== undefined) {
370
- if (targetInput === 'nearest') {
371
- this.input = this._element.find('input');
372
- } else {
373
- this.input = $(targetInput);
374
- }
375
- }
376
-
377
- this._dates = [];
378
- this._dates[0] = this.getMoment();
379
- this._viewDate = this.getMoment().clone();
380
-
381
- $.extend(true, this._options, this._dataToOptions());
382
-
383
- this.options(this._options);
384
-
385
- this._initFormatting();
386
-
387
- if (this.input !== undefined && this.input.is('input') && this.input.val().trim().length !== 0) {
388
- this._setValue(this._parseInputDate(this.input.val().trim()), 0);
389
- } else if (this._options.defaultDate && this.input !== undefined && this.input.attr('placeholder') === undefined) {
390
- this._setValue(this._options.defaultDate, 0);
391
- }
392
- if (this._options.inline) {
393
- this.show();
394
- }
395
- };
396
-
397
- DateTimePicker.prototype._update = function _update() {
398
- if (!this.widget) {
399
- return;
400
- }
401
- this._fillDate();
402
- this._fillTime();
403
- };
404
-
405
- DateTimePicker.prototype._setValue = function _setValue(targetMoment, index) {
406
- var oldDate = this.unset ? null : this._dates[index];
407
- var outpValue = '';
408
- // case of calling setValue(null or false)
409
- if (!targetMoment) {
410
- if (!this._options.allowMultidate || this._dates.length === 1) {
411
- this.unset = true;
412
- this._dates = [];
413
- this._datesFormatted = [];
414
- } else {
415
- outpValue = this._element.data('date') + ',';
416
- outpValue = outpValue.replace(oldDate.format(this.actualFormat) + ',', '').replace(',,', '').replace(/,\s*$/, '');
417
- this._dates.splice(index, 1);
418
- this._datesFormatted.splice(index, 1);
419
- }
420
- if (this.input !== undefined) {
421
- this.input.val(outpValue);
422
- this.input.trigger('input');
423
- }
424
- this._element.data('date', outpValue);
425
- this._notifyEvent({
426
- type: DateTimePicker.Event.CHANGE,
427
- date: false,
428
- oldDate: oldDate
429
- });
430
- this._update();
431
- return;
432
- }
433
-
434
- targetMoment = targetMoment.clone().locale(this._options.locale);
435
-
436
- if (this._hasTimeZone()) {
437
- targetMoment.tz(this._options.timeZone);
438
- }
439
-
440
- if (this._options.stepping !== 1) {
441
- targetMoment.minutes(Math.round(targetMoment.minutes() / this._options.stepping) * this._options.stepping).seconds(0);
442
- }
443
-
444
- if (this._isValid(targetMoment)) {
445
- this._dates[index] = targetMoment;
446
- this._datesFormatted[index] = targetMoment.format('YYYY-MM-DD');
447
- this._viewDate = targetMoment.clone();
448
- if (this._options.allowMultidate && this._dates.length > 1) {
449
- for (var i = 0; i < this._dates.length; i++) {
450
- outpValue += '' + this._dates[i].format(this.actualFormat) + this._options.multidateSeparator;
451
- }
452
- outpValue = outpValue.replace(/,\s*$/, '');
453
- } else {
454
- outpValue = this._dates[index].format(this.actualFormat);
455
- }
456
- if (this.input !== undefined) {
457
- this.input.val(outpValue);
458
- this.input.trigger('input');
459
- }
460
- this._element.data('date', outpValue);
461
-
462
- this.unset = false;
463
- this._update();
464
- this._notifyEvent({
465
- type: DateTimePicker.Event.CHANGE,
466
- date: this._dates[index].clone(),
467
- oldDate: oldDate
468
- });
469
- } else {
470
- if (!this._options.keepInvalid) {
471
- if (this.input !== undefined) {
472
- this.input.val('' + (this.unset ? '' : this._dates[index].format(this.actualFormat)));
473
- this.input.trigger('input');
474
- }
475
- } else {
476
- this._notifyEvent({
477
- type: DateTimePicker.Event.CHANGE,
478
- date: targetMoment,
479
- oldDate: oldDate
480
- });
481
- }
482
- this._notifyEvent({
483
- type: DateTimePicker.Event.ERROR,
484
- date: targetMoment,
485
- oldDate: oldDate
486
- });
487
- }
488
- };
489
-
490
- DateTimePicker.prototype._change = function _change(e) {
491
- var val = $(e.target).val().trim(),
492
- parsedDate = val ? this._parseInputDate(val) : null;
493
- this._setValue(parsedDate);
494
- e.stopImmediatePropagation();
495
- return false;
496
- };
497
-
498
- //noinspection JSMethodCanBeStatic
499
-
500
-
501
- DateTimePicker.prototype._getOptions = function _getOptions(options) {
502
- options = $.extend(true, {}, Default, options);
503
- return options;
504
- };
505
-
506
- DateTimePicker.prototype._hasTimeZone = function _hasTimeZone() {
507
- return moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== '';
508
- };
509
-
510
- DateTimePicker.prototype._isEnabled = function _isEnabled(granularity) {
511
- if (typeof granularity !== 'string' || granularity.length > 1) {
512
- throw new TypeError('isEnabled expects a single character string parameter');
513
- }
514
- switch (granularity) {
515
- case 'y':
516
- return this.actualFormat.indexOf('Y') !== -1;
517
- case 'M':
518
- return this.actualFormat.indexOf('M') !== -1;
519
- case 'd':
520
- return this.actualFormat.toLowerCase().indexOf('d') !== -1;
521
- case 'h':
522
- case 'H':
523
- return this.actualFormat.toLowerCase().indexOf('h') !== -1;
524
- case 'm':
525
- return this.actualFormat.indexOf('m') !== -1;
526
- case 's':
527
- return this.actualFormat.indexOf('s') !== -1;
528
- case 'a':
529
- case 'A':
530
- return this.actualFormat.toLowerCase().indexOf('a') !== -1;
531
- default:
532
- return false;
533
- }
534
- };
535
-
536
- DateTimePicker.prototype._hasTime = function _hasTime() {
537
- return this._isEnabled('h') || this._isEnabled('m') || this._isEnabled('s');
538
- };
539
-
540
- DateTimePicker.prototype._hasDate = function _hasDate() {
541
- return this._isEnabled('y') || this._isEnabled('M') || this._isEnabled('d');
542
- };
543
-
544
- DateTimePicker.prototype._dataToOptions = function _dataToOptions() {
545
- var eData = this._element.data();
546
- var dataOptions = {};
547
-
548
- if (eData.dateOptions && eData.dateOptions instanceof Object) {
549
- dataOptions = $.extend(true, dataOptions, eData.dateOptions);
550
- }
551
-
552
- $.each(this._options, function (key) {
553
- var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1); //todo data api key
554
- if (eData[attributeName] !== undefined) {
555
- dataOptions[key] = eData[attributeName];
556
- } else {
557
- delete dataOptions[key];
558
- }
559
- });
560
- return dataOptions;
561
- };
562
-
563
- DateTimePicker.prototype._notifyEvent = function _notifyEvent(e) {
564
- if (e.type === DateTimePicker.Event.CHANGE && e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate) {
565
- return;
566
- }
567
- this._element.trigger(e);
568
- };
569
-
570
- DateTimePicker.prototype._viewUpdate = function _viewUpdate(e) {
571
- if (e === 'y') {
572
- e = 'YYYY';
573
- }
574
- this._notifyEvent({
575
- type: DateTimePicker.Event.UPDATE,
576
- change: e,
577
- viewDate: this._viewDate.clone()
578
- });
579
- };
580
-
581
- DateTimePicker.prototype._showMode = function _showMode(dir) {
582
- if (!this.widget) {
583
- return;
584
- }
585
- if (dir) {
586
- this.currentViewMode = Math.max(this.MinViewModeNumber, Math.min(3, this.currentViewMode + dir));
587
- }
588
- this.widget.find('.datepicker > div').hide().filter('.datepicker-' + DatePickerModes[this.currentViewMode].CLASS_NAME).show();
589
- };
590
-
591
- DateTimePicker.prototype._isInDisabledDates = function _isInDisabledDates(testDate) {
592
- return this._options.disabledDates[testDate.format('YYYY-MM-DD')] === true;
593
- };
594
-
595
- DateTimePicker.prototype._isInEnabledDates = function _isInEnabledDates(testDate) {
596
- return this._options.enabledDates[testDate.format('YYYY-MM-DD')] === true;
597
- };
598
-
599
- DateTimePicker.prototype._isInDisabledHours = function _isInDisabledHours(testDate) {
600
- return this._options.disabledHours[testDate.format('H')] === true;
601
- };
602
-
603
- DateTimePicker.prototype._isInEnabledHours = function _isInEnabledHours(testDate) {
604
- return this._options.enabledHours[testDate.format('H')] === true;
605
- };
606
-
607
- DateTimePicker.prototype._isValid = function _isValid(targetMoment, granularity) {
608
- if (!targetMoment.isValid()) {
609
- return false;
610
- }
611
- if (this._options.disabledDates && granularity === 'd' && this._isInDisabledDates(targetMoment)) {
612
- return false;
613
- }
614
- if (this._options.enabledDates && granularity === 'd' && !this._isInEnabledDates(targetMoment)) {
615
- return false;
616
- }
617
- if (this._options.minDate && targetMoment.isBefore(this._options.minDate, granularity)) {
618
- return false;
619
- }
620
- if (this._options.maxDate && targetMoment.isAfter(this._options.maxDate, granularity)) {
621
- return false;
622
- }
623
- if (this._options.daysOfWeekDisabled && granularity === 'd' && this._options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {
624
- return false;
625
- }
626
- if (this._options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && this._isInDisabledHours(targetMoment)) {
627
- return false;
628
- }
629
- if (this._options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !this._isInEnabledHours(targetMoment)) {
630
- return false;
631
- }
632
- if (this._options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {
633
- var found = false;
634
- $.each(this._options.disabledTimeIntervals, function () {
635
- if (targetMoment.isBetween(this[0], this[1])) {
636
- found = true;
637
- return false;
638
- }
639
- });
640
- if (found) {
641
- return false;
642
- }
643
- }
644
- return true;
645
- };
646
-
647
- DateTimePicker.prototype._parseInputDate = function _parseInputDate(inputDate) {
648
- if (this._options.parseInputDate === undefined) {
649
- if (!moment.isMoment(inputDate)) {
650
- inputDate = this.getMoment(inputDate);
651
- }
652
- } else {
653
- inputDate = this._options.parseInputDate(inputDate);
654
- }
655
- //inputDate.locale(this.options.locale);
656
- return inputDate;
657
- };
658
-
659
- DateTimePicker.prototype._keydown = function _keydown(e) {
660
- var handler = null,
661
- index = void 0,
662
- index2 = void 0,
663
- keyBindKeys = void 0,
664
- allModifiersPressed = void 0;
665
- var pressedKeys = [],
666
- pressedModifiers = {},
667
- currentKey = e.which,
668
- pressed = 'p';
669
-
670
- keyState[currentKey] = pressed;
671
-
672
- for (index in keyState) {
673
- if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {
674
- pressedKeys.push(index);
675
- if (parseInt(index, 10) !== currentKey) {
676
- pressedModifiers[index] = true;
677
- }
678
- }
679
- }
680
-
681
- for (index in this._options.keyBinds) {
682
- if (this._options.keyBinds.hasOwnProperty(index) && typeof this._options.keyBinds[index] === 'function') {
683
- keyBindKeys = index.split(' ');
684
- if (keyBindKeys.length === pressedKeys.length && KeyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {
685
- allModifiersPressed = true;
686
- for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {
687
- if (!(KeyMap[keyBindKeys[index2]] in pressedModifiers)) {
688
- allModifiersPressed = false;
689
- break;
690
- }
691
- }
692
- if (allModifiersPressed) {
693
- handler = this._options.keyBinds[index];
694
- break;
695
- }
696
- }
697
- }
698
- }
699
-
700
- if (handler) {
701
- if (handler.call(this)) {
702
- e.stopPropagation();
703
- e.preventDefault();
704
- }
705
- }
706
- };
707
-
708
- //noinspection JSMethodCanBeStatic,SpellCheckingInspection
709
-
710
-
711
- DateTimePicker.prototype._keyup = function _keyup(e) {
712
- keyState[e.which] = 'r';
713
- if (keyPressHandled[e.which]) {
714
- keyPressHandled[e.which] = false;
715
- e.stopPropagation();
716
- e.preventDefault();
717
- }
718
- };
719
-
720
- DateTimePicker.prototype._indexGivenDates = function _indexGivenDates(givenDatesArray) {
721
- // Store given enabledDates and disabledDates as keys.
722
- // This way we can check their existence in O(1) time instead of looping through whole array.
723
- // (for example: options.enabledDates['2014-02-27'] === true)
724
- var givenDatesIndexed = {},
725
- self = this;
726
- $.each(givenDatesArray, function () {
727
- var dDate = self._parseInputDate(this);
728
- if (dDate.isValid()) {
729
- givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
730
- }
731
- });
732
- return Object.keys(givenDatesIndexed).length ? givenDatesIndexed : false;
733
- };
734
-
735
- DateTimePicker.prototype._indexGivenHours = function _indexGivenHours(givenHoursArray) {
736
- // Store given enabledHours and disabledHours as keys.
737
- // This way we can check their existence in O(1) time instead of looping through whole array.
738
- // (for example: options.enabledHours['2014-02-27'] === true)
739
- var givenHoursIndexed = {};
740
- $.each(givenHoursArray, function () {
741
- givenHoursIndexed[this] = true;
742
- });
743
- return Object.keys(givenHoursIndexed).length ? givenHoursIndexed : false;
744
- };
745
-
746
- DateTimePicker.prototype._initFormatting = function _initFormatting() {
747
- var format = this._options.format || 'L LT',
748
- self = this;
749
-
750
- this.actualFormat = format.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {
751
- return self._dates[0].localeData().longDateFormat(formatInput) || formatInput; //todo taking the first date should be ok
752
- });
753
-
754
- this.parseFormats = this._options.extraFormats ? this._options.extraFormats.slice() : [];
755
- if (this.parseFormats.indexOf(format) < 0 && this.parseFormats.indexOf(this.actualFormat) < 0) {
756
- this.parseFormats.push(this.actualFormat);
757
- }
758
-
759
- this.use24Hours = this.actualFormat.toLowerCase().indexOf('a') < 1 && this.actualFormat.replace(/\[.*?]/g, '').indexOf('h') < 1;
760
-
761
- if (this._isEnabled('y')) {
762
- this.MinViewModeNumber = 2;
763
- }
764
- if (this._isEnabled('M')) {
765
- this.MinViewModeNumber = 1;
766
- }
767
- if (this._isEnabled('d')) {
768
- this.MinViewModeNumber = 0;
769
- }
770
-
771
- this.currentViewMode = Math.max(this.MinViewModeNumber, this.currentViewMode);
772
-
773
- if (!this.unset) {
774
- this._setValue(this._dates[0], 0);
775
- }
776
- };
777
-
778
- DateTimePicker.prototype._getLastPickedDate = function _getLastPickedDate() {
779
- return this._dates[this._getLastPickedDateIndex()];
780
- };
781
-
782
- DateTimePicker.prototype._getLastPickedDateIndex = function _getLastPickedDateIndex() {
783
- return this._dates.length - 1;
784
- };
785
-
786
- //public
787
-
788
-
789
- DateTimePicker.prototype.getMoment = function getMoment(d) {
790
- var returnMoment = void 0;
791
-
792
- if (d === undefined || d === null) {
793
- returnMoment = moment(); //TODO should this use format? and locale?
794
- } else if (this._hasTimeZone()) {
795
- // There is a string to parse and a default time zone
796
- // parse with the tz function which takes a default time zone if it is not in the format string
797
- returnMoment = moment.tz(d, this.parseFormats, this._options.locale, this._options.useStrict, this._options.timeZone);
798
- } else {
799
- returnMoment = moment(d, this.parseFormats, this._options.locale, this._options.useStrict);
800
- }
801
-
802
- if (this._hasTimeZone()) {
803
- returnMoment.tz(this._options.timeZone);
804
- }
805
-
806
- return returnMoment;
807
- };
808
-
809
- DateTimePicker.prototype.toggle = function toggle() {
810
- return this.widget ? this.hide() : this.show();
811
- };
812
-
813
- DateTimePicker.prototype.ignoreReadonly = function ignoreReadonly(_ignoreReadonly) {
814
- if (arguments.length === 0) {
815
- return this._options.ignoreReadonly;
816
- }
817
- if (typeof _ignoreReadonly !== 'boolean') {
818
- throw new TypeError('ignoreReadonly () expects a boolean parameter');
819
- }
820
- this._options.ignoreReadonly = _ignoreReadonly;
821
- };
822
-
823
- DateTimePicker.prototype.options = function options(newOptions) {
824
- if (arguments.length === 0) {
825
- return $.extend(true, {}, this._options);
826
- }
827
-
828
- if (!(newOptions instanceof Object)) {
829
- throw new TypeError('options() this.options parameter should be an object');
830
- }
831
- $.extend(true, this._options, newOptions);
832
- var self = this;
833
- $.each(this._options, function (key, value) {
834
- if (self[key] !== undefined) {
835
- self[key](value);
836
- }
837
- });
838
- };
839
-
840
- DateTimePicker.prototype.date = function date(newDate, index) {
841
- index = index || 0;
842
- if (arguments.length === 0) {
843
- if (this.unset) {
844
- return null;
845
- }
846
- if (this._options.allowMultidate) {
847
- return this._dates.join(this._options.multidateSeparator);
848
- } else {
849
- return this._dates[index].clone();
850
- }
851
- }
852
-
853
- if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
854
- throw new TypeError('date() parameter must be one of [null, string, moment or Date]');
855
- }
856
-
857
- this._setValue(newDate === null ? null : this._parseInputDate(newDate), index);
858
- };
859
-
860
- DateTimePicker.prototype.format = function format(newFormat) {
861
- if (arguments.length === 0) {
862
- return this._options.format;
863
- }
864
-
865
- if (typeof newFormat !== 'string' && (typeof newFormat !== 'boolean' || newFormat !== false)) {
866
- throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);
867
- }
868
-
869
- this._options.format = newFormat;
870
- if (this.actualFormat) {
871
- this._initFormatting(); // reinitialize formatting
872
- }
873
- };
874
-
875
- DateTimePicker.prototype.timeZone = function timeZone(newZone) {
876
- if (arguments.length === 0) {
877
- return this._options.timeZone;
878
- }
879
-
880
- if (typeof newZone !== 'string') {
881
- throw new TypeError('newZone() expects a string parameter');
882
- }
883
-
884
- this._options.timeZone = newZone;
885
- };
886
-
887
- DateTimePicker.prototype.dayViewHeaderFormat = function dayViewHeaderFormat(newFormat) {
888
- if (arguments.length === 0) {
889
- return this._options.dayViewHeaderFormat;
890
- }
891
-
892
- if (typeof newFormat !== 'string') {
893
- throw new TypeError('dayViewHeaderFormat() expects a string parameter');
894
- }
895
-
896
- this._options.dayViewHeaderFormat = newFormat;
897
- };
898
-
899
- DateTimePicker.prototype.extraFormats = function extraFormats(formats) {
900
- if (arguments.length === 0) {
901
- return this._options.extraFormats;
902
- }
903
-
904
- if (formats !== false && !(formats instanceof Array)) {
905
- throw new TypeError('extraFormats() expects an array or false parameter');
906
- }
907
-
908
- this._options.extraFormats = formats;
909
- if (this.parseFormats) {
910
- this._initFormatting(); // reinit formatting
911
- }
912
- };
913
-
914
- DateTimePicker.prototype.disabledDates = function disabledDates(dates) {
915
- if (arguments.length === 0) {
916
- return this._options.disabledDates ? $.extend({}, this._options.disabledDates) : this._options.disabledDates;
917
- }
918
-
919
- if (!dates) {
920
- this._options.disabledDates = false;
921
- this._update();
922
- return true;
923
- }
924
- if (!(dates instanceof Array)) {
925
- throw new TypeError('disabledDates() expects an array parameter');
926
- }
927
- this._options.disabledDates = this._indexGivenDates(dates);
928
- this._options.enabledDates = false;
929
- this._update();
930
- };
931
-
932
- DateTimePicker.prototype.enabledDates = function enabledDates(dates) {
933
- if (arguments.length === 0) {
934
- return this._options.enabledDates ? $.extend({}, this._options.enabledDates) : this._options.enabledDates;
935
- }
936
-
937
- if (!dates) {
938
- this._options.enabledDates = false;
939
- this._update();
940
- return true;
941
- }
942
- if (!(dates instanceof Array)) {
943
- throw new TypeError('enabledDates() expects an array parameter');
944
- }
945
- this._options.enabledDates = this._indexGivenDates(dates);
946
- this._options.disabledDates = false;
947
- this._update();
948
- };
949
-
950
- DateTimePicker.prototype.daysOfWeekDisabled = function daysOfWeekDisabled(_daysOfWeekDisabled) {
951
- if (arguments.length === 0) {
952
- return this._options.daysOfWeekDisabled.splice(0);
953
- }
954
-
955
- if (typeof _daysOfWeekDisabled === 'boolean' && !_daysOfWeekDisabled) {
956
- this._options.daysOfWeekDisabled = false;
957
- this._update();
958
- return true;
959
- }
960
-
961
- if (!(_daysOfWeekDisabled instanceof Array)) {
962
- throw new TypeError('daysOfWeekDisabled() expects an array parameter');
963
- }
964
- this._options.daysOfWeekDisabled = _daysOfWeekDisabled.reduce(function (previousValue, currentValue) {
965
- currentValue = parseInt(currentValue, 10);
966
- if (currentValue > 6 || currentValue < 0 || isNaN(currentValue)) {
967
- return previousValue;
968
- }
969
- if (previousValue.indexOf(currentValue) === -1) {
970
- previousValue.push(currentValue);
971
- }
972
- return previousValue;
973
- }, []).sort();
974
- if (this._options.useCurrent && !this._options.keepInvalid) {
975
- for (var i = 0; i < this._dates.length; i++) {
976
- var tries = 0;
977
- while (!this._isValid(this._dates[i], 'd')) {
978
- this._dates[i].add(1, 'd');
979
- if (tries === 31) {
980
- throw 'Tried 31 times to find a valid date';
981
- }
982
- tries++;
983
- }
984
- this._setValue(this._dates[i], i);
985
- }
986
- }
987
- this._update();
988
- };
989
-
990
- DateTimePicker.prototype.maxDate = function maxDate(_maxDate) {
991
- if (arguments.length === 0) {
992
- return this._options.maxDate ? this._options.maxDate.clone() : this._options.maxDate;
993
- }
994
-
995
- if (typeof _maxDate === 'boolean' && _maxDate === false) {
996
- this._options.maxDate = false;
997
- this._update();
998
- return true;
999
- }
1000
-
1001
- if (typeof _maxDate === 'string') {
1002
- if (_maxDate === 'now' || _maxDate === 'moment') {
1003
- _maxDate = this.getMoment();
1004
- }
1005
- }
1006
-
1007
- var parsedDate = this._parseInputDate(_maxDate);
1008
-
1009
- if (!parsedDate.isValid()) {
1010
- throw new TypeError('maxDate() Could not parse date parameter: ' + _maxDate);
1011
- }
1012
- if (this._options.minDate && parsedDate.isBefore(this._options.minDate)) {
1013
- throw new TypeError('maxDate() date parameter is before this.options.minDate: ' + parsedDate.format(this.actualFormat));
1014
- }
1015
- this._options.maxDate = parsedDate;
1016
- for (var i = 0; i < this._dates.length; i++) {
1017
- if (this._options.useCurrent && !this._options.keepInvalid && this._dates[i].isAfter(_maxDate)) {
1018
- this._setValue(this._options.maxDate, i);
1019
- }
1020
- }
1021
- if (this._viewDate.isAfter(parsedDate)) {
1022
- this._viewDate = parsedDate.clone().subtract(this._options.stepping, 'm');
1023
- }
1024
- this._update();
1025
- };
1026
-
1027
- DateTimePicker.prototype.minDate = function minDate(_minDate) {
1028
- if (arguments.length === 0) {
1029
- return this._options.minDate ? this._options.minDate.clone() : this._options.minDate;
1030
- }
1031
-
1032
- if (typeof _minDate === 'boolean' && _minDate === false) {
1033
- this._options.minDate = false;
1034
- this._update();
1035
- return true;
1036
- }
1037
-
1038
- if (typeof _minDate === 'string') {
1039
- if (_minDate === 'now' || _minDate === 'moment') {
1040
- _minDate = this.getMoment();
1041
- }
1042
- }
1043
-
1044
- var parsedDate = this._parseInputDate(_minDate);
1045
-
1046
- if (!parsedDate.isValid()) {
1047
- throw new TypeError('minDate() Could not parse date parameter: ' + _minDate);
1048
- }
1049
- if (this._options.maxDate && parsedDate.isAfter(this._options.maxDate)) {
1050
- throw new TypeError('minDate() date parameter is after this.options.maxDate: ' + parsedDate.format(this.actualFormat));
1051
- }
1052
- this._options.minDate = parsedDate;
1053
- for (var i = 0; i < this._dates.length; i++) {
1054
- if (this._options.useCurrent && !this._options.keepInvalid && this._dates[i].isBefore(_minDate)) {
1055
- this._setValue(this._options.minDate, i);
1056
- }
1057
- }
1058
- if (this._viewDate.isBefore(parsedDate)) {
1059
- this._viewDate = parsedDate.clone().add(this._options.stepping, 'm');
1060
- }
1061
- this._update();
1062
- };
1063
-
1064
- DateTimePicker.prototype.defaultDate = function defaultDate(_defaultDate) {
1065
- if (arguments.length === 0) {
1066
- return this._options.defaultDate ? this._options.defaultDate.clone() : this._options.defaultDate;
1067
- }
1068
- if (!_defaultDate) {
1069
- this._options.defaultDate = false;
1070
- return true;
1071
- }
1072
-
1073
- if (typeof _defaultDate === 'string') {
1074
- if (_defaultDate === 'now' || _defaultDate === 'moment') {
1075
- _defaultDate = this.getMoment();
1076
- } else {
1077
- _defaultDate = this.getMoment(_defaultDate);
1078
- }
1079
- }
1080
-
1081
- var parsedDate = this._parseInputDate(_defaultDate);
1082
- if (!parsedDate.isValid()) {
1083
- throw new TypeError('defaultDate() Could not parse date parameter: ' + _defaultDate);
1084
- }
1085
- if (!this._isValid(parsedDate)) {
1086
- throw new TypeError('defaultDate() date passed is invalid according to component setup validations');
1087
- }
1088
-
1089
- this._options.defaultDate = parsedDate;
1090
-
1091
- if (this._options.defaultDate && this._options.inline || this.input !== undefined && this.input.val().trim() === '') {
1092
- this._setValue(this._options.defaultDate, 0);
1093
- }
1094
- };
1095
-
1096
- DateTimePicker.prototype.locale = function locale(_locale) {
1097
- if (arguments.length === 0) {
1098
- return this._options.locale;
1099
- }
1100
-
1101
- if (!moment.localeData(_locale)) {
1102
- throw new TypeError('locale() locale ' + _locale + ' is not loaded from moment locales!');
1103
- }
1104
-
1105
- this._options.locale = _locale;
1106
-
1107
- for (var i = 0; i < this._dates.length; i++) {
1108
- this._dates[i].locale(this._options.locale);
1109
- }
1110
- this._viewDate.locale(this._options.locale);
1111
-
1112
- if (this.actualFormat) {
1113
- this._initFormatting(); // reinitialize formatting
1114
- }
1115
- if (this.widget) {
1116
- this.hide();
1117
- this.show();
1118
- }
1119
- };
1120
-
1121
- DateTimePicker.prototype.stepping = function stepping(_stepping) {
1122
- if (arguments.length === 0) {
1123
- return this._options.stepping;
1124
- }
1125
-
1126
- _stepping = parseInt(_stepping, 10);
1127
- if (isNaN(_stepping) || _stepping < 1) {
1128
- _stepping = 1;
1129
- }
1130
- this._options.stepping = _stepping;
1131
- };
1132
-
1133
- DateTimePicker.prototype.useCurrent = function useCurrent(_useCurrent) {
1134
- var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];
1135
- if (arguments.length === 0) {
1136
- return this._options.useCurrent;
1137
- }
1138
-
1139
- if (typeof _useCurrent !== 'boolean' && typeof _useCurrent !== 'string') {
1140
- throw new TypeError('useCurrent() expects a boolean or string parameter');
1141
- }
1142
- if (typeof _useCurrent === 'string' && useCurrentOptions.indexOf(_useCurrent.toLowerCase()) === -1) {
1143
- throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));
1144
- }
1145
- this._options.useCurrent = _useCurrent;
1146
- };
1147
-
1148
- DateTimePicker.prototype.collapse = function collapse(_collapse) {
1149
- if (arguments.length === 0) {
1150
- return this._options.collapse;
1151
- }
1152
-
1153
- if (typeof _collapse !== 'boolean') {
1154
- throw new TypeError('collapse() expects a boolean parameter');
1155
- }
1156
- if (this._options.collapse === _collapse) {
1157
- return true;
1158
- }
1159
- this._options.collapse = _collapse;
1160
- if (this.widget) {
1161
- this.hide();
1162
- this.show();
1163
- }
1164
- };
1165
-
1166
- DateTimePicker.prototype.icons = function icons(_icons) {
1167
- if (arguments.length === 0) {
1168
- return $.extend({}, this._options.icons);
1169
- }
1170
-
1171
- if (!(_icons instanceof Object)) {
1172
- throw new TypeError('icons() expects parameter to be an Object');
1173
- }
1174
-
1175
- $.extend(this._options.icons, _icons);
1176
-
1177
- if (this.widget) {
1178
- this.hide();
1179
- this.show();
1180
- }
1181
- };
1182
-
1183
- DateTimePicker.prototype.tooltips = function tooltips(_tooltips) {
1184
- if (arguments.length === 0) {
1185
- return $.extend({}, this._options.tooltips);
1186
- }
1187
-
1188
- if (!(_tooltips instanceof Object)) {
1189
- throw new TypeError('tooltips() expects parameter to be an Object');
1190
- }
1191
- $.extend(this._options.tooltips, _tooltips);
1192
- if (this.widget) {
1193
- this.hide();
1194
- this.show();
1195
- }
1196
- };
1197
-
1198
- DateTimePicker.prototype.useStrict = function useStrict(_useStrict) {
1199
- if (arguments.length === 0) {
1200
- return this._options.useStrict;
1201
- }
1202
-
1203
- if (typeof _useStrict !== 'boolean') {
1204
- throw new TypeError('useStrict() expects a boolean parameter');
1205
- }
1206
- this._options.useStrict = _useStrict;
1207
- };
1208
-
1209
- DateTimePicker.prototype.sideBySide = function sideBySide(_sideBySide) {
1210
- if (arguments.length === 0) {
1211
- return this._options.sideBySide;
1212
- }
1213
-
1214
- if (typeof _sideBySide !== 'boolean') {
1215
- throw new TypeError('sideBySide() expects a boolean parameter');
1216
- }
1217
- this._options.sideBySide = _sideBySide;
1218
- if (this.widget) {
1219
- this.hide();
1220
- this.show();
1221
- }
1222
- };
1223
-
1224
- DateTimePicker.prototype.viewMode = function viewMode(_viewMode) {
1225
- if (arguments.length === 0) {
1226
- return this._options.viewMode;
1227
- }
1228
-
1229
- if (typeof _viewMode !== 'string') {
1230
- throw new TypeError('viewMode() expects a string parameter');
1231
- }
1232
-
1233
- if (DateTimePicker.ViewModes.indexOf(_viewMode) === -1) {
1234
- throw new TypeError('viewMode() parameter must be one of (' + DateTimePicker.ViewModes.join(', ') + ') value');
1235
- }
1236
-
1237
- this._options.viewMode = _viewMode;
1238
- this.currentViewMode = Math.max(DateTimePicker.ViewModes.indexOf(_viewMode) - 1, this.MinViewModeNumber);
1239
-
1240
- this._showMode();
1241
- };
1242
-
1243
- DateTimePicker.prototype.calendarWeeks = function calendarWeeks(_calendarWeeks) {
1244
- if (arguments.length === 0) {
1245
- return this._options.calendarWeeks;
1246
- }
1247
-
1248
- if (typeof _calendarWeeks !== 'boolean') {
1249
- throw new TypeError('calendarWeeks() expects parameter to be a boolean value');
1250
- }
1251
-
1252
- this._options.calendarWeeks = _calendarWeeks;
1253
- this._update();
1254
- };
1255
-
1256
- DateTimePicker.prototype.buttons = function buttons(_buttons) {
1257
- if (arguments.length === 0) {
1258
- return $.extend({}, this._options.buttons);
1259
- }
1260
-
1261
- if (!(_buttons instanceof Object)) {
1262
- throw new TypeError('buttons() expects parameter to be an Object');
1263
- }
1264
-
1265
- $.extend(this._options.buttons, _buttons);
1266
-
1267
- if (typeof this._options.buttons.showToday !== 'boolean') {
1268
- throw new TypeError('buttons.showToday expects a boolean parameter');
1269
- }
1270
- if (typeof this._options.buttons.showClear !== 'boolean') {
1271
- throw new TypeError('buttons.showClear expects a boolean parameter');
1272
- }
1273
- if (typeof this._options.buttons.showClose !== 'boolean') {
1274
- throw new TypeError('buttons.showClose expects a boolean parameter');
1275
- }
1276
-
1277
- if (this.widget) {
1278
- this.hide();
1279
- this.show();
1280
- }
1281
- };
1282
-
1283
- DateTimePicker.prototype.keepOpen = function keepOpen(_keepOpen) {
1284
- if (arguments.length === 0) {
1285
- return this._options.keepOpen;
1286
- }
1287
-
1288
- if (typeof _keepOpen !== 'boolean') {
1289
- throw new TypeError('keepOpen() expects a boolean parameter');
1290
- }
1291
-
1292
- this._options.keepOpen = _keepOpen;
1293
- };
1294
-
1295
- DateTimePicker.prototype.focusOnShow = function focusOnShow(_focusOnShow) {
1296
- if (arguments.length === 0) {
1297
- return this._options.focusOnShow;
1298
- }
1299
-
1300
- if (typeof _focusOnShow !== 'boolean') {
1301
- throw new TypeError('focusOnShow() expects a boolean parameter');
1302
- }
1303
-
1304
- this._options.focusOnShow = _focusOnShow;
1305
- };
1306
-
1307
- DateTimePicker.prototype.inline = function inline(_inline) {
1308
- if (arguments.length === 0) {
1309
- return this._options.inline;
1310
- }
1311
-
1312
- if (typeof _inline !== 'boolean') {
1313
- throw new TypeError('inline() expects a boolean parameter');
1314
- }
1315
-
1316
- this._options.inline = _inline;
1317
- };
1318
-
1319
- DateTimePicker.prototype.clear = function clear() {
1320
- this._setValue(null); //todo
1321
- };
1322
-
1323
- DateTimePicker.prototype.keyBinds = function keyBinds(_keyBinds) {
1324
- if (arguments.length === 0) {
1325
- return this._options.keyBinds;
1326
- }
1327
-
1328
- this._options.keyBinds = _keyBinds;
1329
- };
1330
-
1331
- DateTimePicker.prototype.debug = function debug(_debug) {
1332
- if (typeof _debug !== 'boolean') {
1333
- throw new TypeError('debug() expects a boolean parameter');
1334
- }
1335
-
1336
- this._options.debug = _debug;
1337
- };
1338
-
1339
- DateTimePicker.prototype.allowInputToggle = function allowInputToggle(_allowInputToggle) {
1340
- if (arguments.length === 0) {
1341
- return this._options.allowInputToggle;
1342
- }
1343
-
1344
- if (typeof _allowInputToggle !== 'boolean') {
1345
- throw new TypeError('allowInputToggle() expects a boolean parameter');
1346
- }
1347
-
1348
- this._options.allowInputToggle = _allowInputToggle;
1349
- };
1350
-
1351
- DateTimePicker.prototype.keepInvalid = function keepInvalid(_keepInvalid) {
1352
- if (arguments.length === 0) {
1353
- return this._options.keepInvalid;
1354
- }
1355
-
1356
- if (typeof _keepInvalid !== 'boolean') {
1357
- throw new TypeError('keepInvalid() expects a boolean parameter');
1358
- }
1359
- this._options.keepInvalid = _keepInvalid;
1360
- };
1361
-
1362
- DateTimePicker.prototype.datepickerInput = function datepickerInput(_datepickerInput) {
1363
- if (arguments.length === 0) {
1364
- return this._options.datepickerInput;
1365
- }
1366
-
1367
- if (typeof _datepickerInput !== 'string') {
1368
- throw new TypeError('datepickerInput() expects a string parameter');
1369
- }
1370
-
1371
- this._options.datepickerInput = _datepickerInput;
1372
- };
1373
-
1374
- DateTimePicker.prototype.parseInputDate = function parseInputDate(_parseInputDate2) {
1375
- if (arguments.length === 0) {
1376
- return this._options.parseInputDate;
1377
- }
1378
-
1379
- if (typeof _parseInputDate2 !== 'function') {
1380
- throw new TypeError('parseInputDate() should be as function');
1381
- }
1382
-
1383
- this._options.parseInputDate = _parseInputDate2;
1384
- };
1385
-
1386
- DateTimePicker.prototype.disabledTimeIntervals = function disabledTimeIntervals(_disabledTimeIntervals) {
1387
- if (arguments.length === 0) {
1388
- return this._options.disabledTimeIntervals ? $.extend({}, this._options.disabledTimeIntervals) : this._options.disabledTimeIntervals;
1389
- }
1390
-
1391
- if (!_disabledTimeIntervals) {
1392
- this._options.disabledTimeIntervals = false;
1393
- this._update();
1394
- return true;
1395
- }
1396
- if (!(_disabledTimeIntervals instanceof Array)) {
1397
- throw new TypeError('disabledTimeIntervals() expects an array parameter');
1398
- }
1399
- this._options.disabledTimeIntervals = _disabledTimeIntervals;
1400
- this._update();
1401
- };
1402
-
1403
- DateTimePicker.prototype.disabledHours = function disabledHours(hours) {
1404
- if (arguments.length === 0) {
1405
- return this._options.disabledHours ? $.extend({}, this._options.disabledHours) : this._options.disabledHours;
1406
- }
1407
-
1408
- if (!hours) {
1409
- this._options.disabledHours = false;
1410
- this._update();
1411
- return true;
1412
- }
1413
- if (!(hours instanceof Array)) {
1414
- throw new TypeError('disabledHours() expects an array parameter');
1415
- }
1416
- this._options.disabledHours = this._indexGivenHours(hours);
1417
- this._options.enabledHours = false;
1418
- if (this._options.useCurrent && !this._options.keepInvalid) {
1419
- for (var i = 0; i < this._dates.length; i++) {
1420
- var tries = 0;
1421
- while (!this._isValid(this._dates[i], 'h')) {
1422
- this._dates[i].add(1, 'h');
1423
- if (tries === 24) {
1424
- throw 'Tried 24 times to find a valid date';
1425
- }
1426
- tries++;
1427
- }
1428
- this._setValue(this._dates[i], i);
1429
- }
1430
- }
1431
- this._update();
1432
- };
1433
-
1434
- DateTimePicker.prototype.enabledHours = function enabledHours(hours) {
1435
- if (arguments.length === 0) {
1436
- return this._options.enabledHours ? $.extend({}, this._options.enabledHours) : this._options.enabledHours;
1437
- }
1438
-
1439
- if (!hours) {
1440
- this._options.enabledHours = false;
1441
- this._update();
1442
- return true;
1443
- }
1444
- if (!(hours instanceof Array)) {
1445
- throw new TypeError('enabledHours() expects an array parameter');
1446
- }
1447
- this._options.enabledHours = this._indexGivenHours(hours);
1448
- this._options.disabledHours = false;
1449
- if (this._options.useCurrent && !this._options.keepInvalid) {
1450
- for (var i = 0; i < this._dates.length; i++) {
1451
- var tries = 0;
1452
- while (!this._isValid(this._dates[i], 'h')) {
1453
- this._dates[i].add(1, 'h');
1454
- if (tries === 24) {
1455
- throw 'Tried 24 times to find a valid date';
1456
- }
1457
- tries++;
1458
- }
1459
- this._setValue(this._dates[i], i);
1460
- }
1461
- }
1462
- this._update();
1463
- };
1464
-
1465
- DateTimePicker.prototype.viewDate = function viewDate(newDate) {
1466
- if (arguments.length === 0) {
1467
- return this._viewDate.clone();
1468
- }
1469
-
1470
- if (!newDate) {
1471
- this._viewDate = (this._dates[0] || this.getMoment()).clone();
1472
- return true;
1473
- }
1474
-
1475
- if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
1476
- throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');
1477
- }
1478
-
1479
- this._viewDate = this._parseInputDate(newDate);
1480
- this._viewUpdate();
1481
- };
1482
-
1483
- DateTimePicker.prototype.allowMultidate = function allowMultidate(_allowMultidate) {
1484
- if (typeof _allowMultidate !== 'boolean') {
1485
- throw new TypeError('allowMultidate() expects a boolean parameter');
1486
- }
1487
-
1488
- this._options.allowMultidate = _allowMultidate;
1489
- };
1490
-
1491
- DateTimePicker.prototype.multidateSeparator = function multidateSeparator(_multidateSeparator) {
1492
- if (arguments.length === 0) {
1493
- return this._options.multidateSeparator;
1494
- }
1495
-
1496
- if (typeof _multidateSeparator !== 'string' || _multidateSeparator.length > 1) {
1497
- throw new TypeError('multidateSeparator expects a single character string parameter');
1498
- }
1499
-
1500
- this._options.multidateSeparator = _multidateSeparator;
1501
- };
1502
-
1503
- _createClass(DateTimePicker, null, [{
1504
- key: 'NAME',
1505
- get: function get() {
1506
- return NAME;
1507
- }
1508
-
1509
- /**
1510
- * @return {string}
1511
- */
1512
-
1513
- }, {
1514
- key: 'DATA_KEY',
1515
- get: function get() {
1516
- return DATA_KEY;
1517
- }
1518
-
1519
- /**
1520
- * @return {string}
1521
- */
1522
-
1523
- }, {
1524
- key: 'EVENT_KEY',
1525
- get: function get() {
1526
- return EVENT_KEY;
1527
- }
1528
-
1529
- /**
1530
- * @return {string}
1531
- */
1532
-
1533
- }, {
1534
- key: 'DATA_API_KEY',
1535
- get: function get() {
1536
- return DATA_API_KEY;
1537
- }
1538
- }, {
1539
- key: 'DatePickerModes',
1540
- get: function get() {
1541
- return DatePickerModes;
1542
- }
1543
- }, {
1544
- key: 'ViewModes',
1545
- get: function get() {
1546
- return ViewModes;
1547
- }
1548
- }, {
1549
- key: 'Event',
1550
- get: function get() {
1551
- return Event;
1552
- }
1553
- }, {
1554
- key: 'Selector',
1555
- get: function get() {
1556
- return Selector;
1557
- }
1558
- }, {
1559
- key: 'Default',
1560
- get: function get() {
1561
- return Default;
1562
- },
1563
- set: function set(value) {
1564
- Default = value;
1565
- }
1566
- }, {
1567
- key: 'ClassName',
1568
- get: function get() {
1569
- return ClassName;
1570
- }
1571
- }]);
1572
-
1573
- return DateTimePicker;
1574
- }();
1575
-
1576
- return DateTimePicker;
1577
- }(jQuery, moment);
1578
-
1579
- //noinspection JSUnusedGlobalSymbols
1580
- /* global DateTimePicker */
1581
- var TempusDominusBootstrap4 = function ($) {
1582
- // eslint-disable-line no-unused-vars
1583
- // ReSharper disable once InconsistentNaming
1584
- var JQUERY_NO_CONFLICT = $.fn[DateTimePicker.NAME],
1585
- verticalModes = ['top', 'bottom', 'auto'],
1586
- horizontalModes = ['left', 'right', 'auto'],
1587
- toolbarPlacements = ['default', 'top', 'bottom'],
1588
- getSelectorFromElement = function getSelectorFromElement($element) {
1589
- var selector = $element.data('target'),
1590
- $selector = void 0;
1591
-
1592
- if (!selector) {
1593
- selector = $element.attr('href') || '';
1594
- selector = /^#[a-z]/i.test(selector) ? selector : null;
1595
- }
1596
- $selector = $(selector);
1597
- if ($selector.length === 0) {
1598
- return $selector;
1599
- }
1600
-
1601
- if (!$selector.data(DateTimePicker.DATA_KEY)) {
1602
- $.extend({}, $selector.data(), $(this).data());
1603
- }
1604
-
1605
- return $selector;
1606
- };
1607
-
1608
- // ReSharper disable once InconsistentNaming
1609
-
1610
- var TempusDominusBootstrap4 = function (_DateTimePicker) {
1611
- _inherits(TempusDominusBootstrap4, _DateTimePicker);
1612
-
1613
- function TempusDominusBootstrap4(element, options) {
1614
- _classCallCheck(this, TempusDominusBootstrap4);
1615
-
1616
- var _this = _possibleConstructorReturn(this, _DateTimePicker.call(this, element, options));
1617
-
1618
- _this._init();
1619
- return _this;
1620
- }
1621
-
1622
- TempusDominusBootstrap4.prototype._init = function _init() {
1623
- if (this._element.hasClass('input-group')) {
1624
- var datepickerButton = this._element.find('.datepickerbutton');
1625
- if (datepickerButton.length === 0) {
1626
- this.component = this._element.find('[data-toggle="datetimepicker"]');
1627
- } else {
1628
- this.component = datepickerButton;
1629
- }
1630
- }
1631
- };
1632
-
1633
- TempusDominusBootstrap4.prototype._getDatePickerTemplate = function _getDatePickerTemplate() {
1634
- var headTemplate = $('<thead>').append($('<tr>').append($('<th>').addClass('prev').attr('data-action', 'previous').append($('<span>').addClass(this._options.icons.previous))).append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', '' + (this._options.calendarWeeks ? '6' : '5'))).append($('<th>').addClass('next').attr('data-action', 'next').append($('<span>').addClass(this._options.icons.next)))),
1635
- contTemplate = $('<tbody>').append($('<tr>').append($('<td>').attr('colspan', '' + (this._options.calendarWeeks ? '8' : '7'))));
1636
-
1637
- return [$('<div>').addClass('datepicker-days').append($('<table>').addClass('table table-sm').append(headTemplate).append($('<tbody>'))), $('<div>').addClass('datepicker-months').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('<div>').addClass('datepicker-years').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('<div>').addClass('datepicker-decades').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone()))];
1638
- };
1639
-
1640
- TempusDominusBootstrap4.prototype._getTimePickerMainTemplate = function _getTimePickerMainTemplate() {
1641
- var topRow = $('<tr>'),
1642
- middleRow = $('<tr>'),
1643
- bottomRow = $('<tr>');
1644
-
1645
- if (this._isEnabled('h')) {
1646
- topRow.append($('<td>').append($('<a>').attr({
1647
- href: '#',
1648
- tabindex: '-1',
1649
- 'title': this._options.tooltips.incrementHour
1650
- }).addClass('btn').attr('data-action', 'incrementHours').append($('<span>').addClass(this._options.icons.up))));
1651
- middleRow.append($('<td>').append($('<span>').addClass('timepicker-hour').attr({
1652
- 'data-time-component': 'hours',
1653
- 'title': this._options.tooltips.pickHour
1654
- }).attr('data-action', 'showHours')));
1655
- bottomRow.append($('<td>').append($('<a>').attr({
1656
- href: '#',
1657
- tabindex: '-1',
1658
- 'title': this._options.tooltips.decrementHour
1659
- }).addClass('btn').attr('data-action', 'decrementHours').append($('<span>').addClass(this._options.icons.down))));
1660
- }
1661
- if (this._isEnabled('m')) {
1662
- if (this._isEnabled('h')) {
1663
- topRow.append($('<td>').addClass('separator'));
1664
- middleRow.append($('<td>').addClass('separator').html(':'));
1665
- bottomRow.append($('<td>').addClass('separator'));
1666
- }
1667
- topRow.append($('<td>').append($('<a>').attr({
1668
- href: '#',
1669
- tabindex: '-1',
1670
- 'title': this._options.tooltips.incrementMinute
1671
- }).addClass('btn').attr('data-action', 'incrementMinutes').append($('<span>').addClass(this._options.icons.up))));
1672
- middleRow.append($('<td>').append($('<span>').addClass('timepicker-minute').attr({
1673
- 'data-time-component': 'minutes',
1674
- 'title': this._options.tooltips.pickMinute
1675
- }).attr('data-action', 'showMinutes')));
1676
- bottomRow.append($('<td>').append($('<a>').attr({
1677
- href: '#',
1678
- tabindex: '-1',
1679
- 'title': this._options.tooltips.decrementMinute
1680
- }).addClass('btn').attr('data-action', 'decrementMinutes').append($('<span>').addClass(this._options.icons.down))));
1681
- }
1682
- if (this._isEnabled('s')) {
1683
- if (this._isEnabled('m')) {
1684
- topRow.append($('<td>').addClass('separator'));
1685
- middleRow.append($('<td>').addClass('separator').html(':'));
1686
- bottomRow.append($('<td>').addClass('separator'));
1687
- }
1688
- topRow.append($('<td>').append($('<a>').attr({
1689
- href: '#',
1690
- tabindex: '-1',
1691
- 'title': this._options.tooltips.incrementSecond
1692
- }).addClass('btn').attr('data-action', 'incrementSeconds').append($('<span>').addClass(this._options.icons.up))));
1693
- middleRow.append($('<td>').append($('<span>').addClass('timepicker-second').attr({
1694
- 'data-time-component': 'seconds',
1695
- 'title': this._options.tooltips.pickSecond
1696
- }).attr('data-action', 'showSeconds')));
1697
- bottomRow.append($('<td>').append($('<a>').attr({
1698
- href: '#',
1699
- tabindex: '-1',
1700
- 'title': this._options.tooltips.decrementSecond
1701
- }).addClass('btn').attr('data-action', 'decrementSeconds').append($('<span>').addClass(this._options.icons.down))));
1702
- }
1703
-
1704
- if (!this.use24Hours) {
1705
- topRow.append($('<td>').addClass('separator'));
1706
- middleRow.append($('<td>').append($('<button>').addClass('btn btn-primary').attr({
1707
- 'data-action': 'togglePeriod',
1708
- tabindex: '-1',
1709
- 'title': this._options.tooltips.togglePeriod
1710
- })));
1711
- bottomRow.append($('<td>').addClass('separator'));
1712
- }
1713
-
1714
- return $('<div>').addClass('timepicker-picker').append($('<table>').addClass('table-condensed').append([topRow, middleRow, bottomRow]));
1715
- };
1716
-
1717
- TempusDominusBootstrap4.prototype._getTimePickerTemplate = function _getTimePickerTemplate() {
1718
- var hoursView = $('<div>').addClass('timepicker-hours').append($('<table>').addClass('table-condensed')),
1719
- minutesView = $('<div>').addClass('timepicker-minutes').append($('<table>').addClass('table-condensed')),
1720
- secondsView = $('<div>').addClass('timepicker-seconds').append($('<table>').addClass('table-condensed')),
1721
- ret = [this._getTimePickerMainTemplate()];
1722
-
1723
- if (this._isEnabled('h')) {
1724
- ret.push(hoursView);
1725
- }
1726
- if (this._isEnabled('m')) {
1727
- ret.push(minutesView);
1728
- }
1729
- if (this._isEnabled('s')) {
1730
- ret.push(secondsView);
1731
- }
1732
-
1733
- return ret;
1734
- };
1735
-
1736
- TempusDominusBootstrap4.prototype._getToolbar = function _getToolbar() {
1737
- var row = [];
1738
- if (this._options.buttons.showToday) {
1739
- row.push($('<td>').append($('<a>').attr({
1740
- href: '#',
1741
- tabindex: '-1',
1742
- 'data-action': 'today',
1743
- 'title': this._options.tooltips.today
1744
- }).append($('<span>').addClass(this._options.icons.today))));
1745
- }
1746
- if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
1747
- var title = void 0,
1748
- icon = void 0;
1749
- if (this._options.viewMode === 'times') {
1750
- title = this._options.tooltips.selectDate;
1751
- icon = this._options.icons.date;
1752
- } else {
1753
- title = this._options.tooltips.selectTime;
1754
- icon = this._options.icons.time;
1755
- }
1756
- row.push($('<td>').append($('<a>').attr({
1757
- href: '#',
1758
- tabindex: '-1',
1759
- 'data-action': 'togglePicker',
1760
- 'title': title
1761
- }).append($('<span>').addClass(icon))));
1762
- }
1763
- if (this._options.buttons.showClear) {
1764
- row.push($('<td>').append($('<a>').attr({
1765
- href: '#',
1766
- tabindex: '-1',
1767
- 'data-action': 'clear',
1768
- 'title': this._options.tooltips.clear
1769
- }).append($('<span>').addClass(this._options.icons.clear))));
1770
- }
1771
- if (this._options.buttons.showClose) {
1772
- row.push($('<td>').append($('<a>').attr({
1773
- href: '#',
1774
- tabindex: '-1',
1775
- 'data-action': 'close',
1776
- 'title': this._options.tooltips.close
1777
- }).append($('<span>').addClass(this._options.icons.close))));
1778
- }
1779
- return row.length === 0 ? '' : $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));
1780
- };
1781
-
1782
- TempusDominusBootstrap4.prototype._getTemplate = function _getTemplate() {
1783
- var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),
1784
- dateView = $('<div>').addClass('datepicker').append(this._getDatePickerTemplate()),
1785
- timeView = $('<div>').addClass('timepicker').append(this._getTimePickerTemplate()),
1786
- content = $('<ul>').addClass('list-unstyled'),
1787
- toolbar = $('<li>').addClass('picker-switch' + (this._options.collapse ? ' accordion-toggle' : '')).append(this._getToolbar());
1788
-
1789
- if (this._options.inline) {
1790
- template.removeClass('dropdown-menu');
1791
- }
1792
-
1793
- if (this.use24Hours) {
1794
- template.addClass('usetwentyfour');
1795
- }
1796
- if (this._isEnabled('s') && !this.use24Hours) {
1797
- template.addClass('wider');
1798
- }
1799
-
1800
- if (this._options.sideBySide && this._hasDate() && this._hasTime()) {
1801
- template.addClass('timepicker-sbs');
1802
- if (this._options.toolbarPlacement === 'top') {
1803
- template.append(toolbar);
1804
- }
1805
- template.append($('<div>').addClass('row').append(dateView.addClass('col-md-6')).append(timeView.addClass('col-md-6')));
1806
- if (this._options.toolbarPlacement === 'bottom' || this._options.toolbarPlacement === 'default') {
1807
- template.append(toolbar);
1808
- }
1809
- return template;
1810
- }
1811
-
1812
- if (this._options.toolbarPlacement === 'top') {
1813
- content.append(toolbar);
1814
- }
1815
- if (this._hasDate()) {
1816
- content.append($('<li>').addClass(this._options.collapse && this._hasTime() ? 'collapse' : '').addClass(this._options.collapse && this._hasTime() && this._options.viewMode === 'times' ? '' : 'show').append(dateView));
1817
- }
1818
- if (this._options.toolbarPlacement === 'default') {
1819
- content.append(toolbar);
1820
- }
1821
- if (this._hasTime()) {
1822
- content.append($('<li>').addClass(this._options.collapse && this._hasDate() ? 'collapse' : '').addClass(this._options.collapse && this._hasDate() && this._options.viewMode === 'times' ? 'show' : '').append(timeView));
1823
- }
1824
- if (this._options.toolbarPlacement === 'bottom') {
1825
- content.append(toolbar);
1826
- }
1827
- return template.append(content);
1828
- };
1829
-
1830
- TempusDominusBootstrap4.prototype._place = function _place(e) {
1831
- var self = e && e.data && e.data.picker || this,
1832
- vertical = self._options.widgetPositioning.vertical,
1833
- horizontal = self._options.widgetPositioning.horizontal,
1834
- parent = void 0;
1835
- var position = (self.component && self.component.length ? self.component : self._element).position(),
1836
- offset = (self.component && self.component.length ? self.component : self._element).offset();
1837
- if (self._options.widgetParent) {
1838
- parent = self._options.widgetParent.append(self.widget);
1839
- } else if (self._element.is('input')) {
1840
- parent = self._element.after(self.widget).parent();
1841
- } else if (self._options.inline) {
1842
- parent = self._element.append(self.widget);
1843
- return;
1844
- } else {
1845
- parent = self._element;
1846
- self._element.children().first().after(self.widget);
1847
- }
1848
-
1849
- // Top and bottom logic
1850
- if (vertical === 'auto') {
1851
- //noinspection JSValidateTypes
1852
- if (offset.top + self.widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() && self.widget.height() + self._element.outerHeight() < offset.top) {
1853
- vertical = 'top';
1854
- } else {
1855
- vertical = 'bottom';
1856
- }
1857
- }
1858
-
1859
- // Left and right logic
1860
- if (horizontal === 'auto') {
1861
- if (parent.width() < offset.left + self.widget.outerWidth() / 2 && offset.left + self.widget.outerWidth() > $(window).width()) {
1862
- horizontal = 'right';
1863
- } else {
1864
- horizontal = 'left';
1865
- }
1866
- }
1867
-
1868
- if (vertical === 'top') {
1869
- self.widget.addClass('top').removeClass('bottom');
1870
- } else {
1871
- self.widget.addClass('bottom').removeClass('top');
1872
- }
1873
-
1874
- if (horizontal === 'right') {
1875
- self.widget.addClass('float-right');
1876
- } else {
1877
- self.widget.removeClass('float-right');
1878
- }
1879
-
1880
- // find the first parent element that has a relative css positioning
1881
- if (parent.css('position') !== 'relative') {
1882
- parent = parent.parents().filter(function () {
1883
- return $(this).css('position') === 'relative';
1884
- }).first();
1885
- }
1886
-
1887
- if (parent.length === 0) {
1888
- throw new Error('datetimepicker component should be placed within a relative positioned container');
1889
- }
1890
-
1891
- self.widget.css({
1892
- top: vertical === 'top' ? 'auto' : position.top + self._element.outerHeight() + 'px',
1893
- bottom: vertical === 'top' ? parent.outerHeight() - (parent === self._element ? 0 : position.top) + 'px' : 'auto',
1894
- left: horizontal === 'left' ? (parent === self._element ? 0 : position.left) + 'px' : 'auto',
1895
- right: horizontal === 'left' ? 'auto' : parent.outerWidth() - self._element.outerWidth() - (parent === self._element ? 0 : position.left) + 'px'
1896
- });
1897
- };
1898
-
1899
- TempusDominusBootstrap4.prototype._fillDow = function _fillDow() {
1900
- var row = $('<tr>'),
1901
- currentDate = this._viewDate.clone().startOf('w').startOf('d');
1902
-
1903
- if (this._options.calendarWeeks === true) {
1904
- row.append($('<th>').addClass('cw').text('#'));
1905
- }
1906
-
1907
- while (currentDate.isBefore(this._viewDate.clone().endOf('w'))) {
1908
- row.append($('<th>').addClass('dow').text(currentDate.format('dd')));
1909
- currentDate.add(1, 'd');
1910
- }
1911
- this.widget.find('.datepicker-days thead').append(row);
1912
- };
1913
-
1914
- TempusDominusBootstrap4.prototype._fillMonths = function _fillMonths() {
1915
- var spans = [],
1916
- monthsShort = this._viewDate.clone().startOf('y').startOf('d');
1917
- while (monthsShort.isSame(this._viewDate, 'y')) {
1918
- spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));
1919
- monthsShort.add(1, 'M');
1920
- }
1921
- this.widget.find('.datepicker-months td').empty().append(spans);
1922
- };
1923
-
1924
- TempusDominusBootstrap4.prototype._updateMonths = function _updateMonths() {
1925
- var monthsView = this.widget.find('.datepicker-months'),
1926
- monthsViewHeader = monthsView.find('th'),
1927
- months = monthsView.find('tbody').find('span'),
1928
- self = this;
1929
-
1930
- monthsViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevYear);
1931
- monthsViewHeader.eq(1).attr('title', this._options.tooltips.selectYear);
1932
- monthsViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextYear);
1933
-
1934
- monthsView.find('.disabled').removeClass('disabled');
1935
-
1936
- if (!this._isValid(this._viewDate.clone().subtract(1, 'y'), 'y')) {
1937
- monthsViewHeader.eq(0).addClass('disabled');
1938
- }
1939
-
1940
- monthsViewHeader.eq(1).text(this._viewDate.year());
1941
-
1942
- if (!this._isValid(this._viewDate.clone().add(1, 'y'), 'y')) {
1943
- monthsViewHeader.eq(2).addClass('disabled');
1944
- }
1945
-
1946
- months.removeClass('active');
1947
- if (this._getLastPickedDate().isSame(this._viewDate, 'y') && !this.unset) {
1948
- months.eq(this._getLastPickedDate().month()).addClass('active');
1949
- }
1950
-
1951
- months.each(function (index) {
1952
- if (!self._isValid(self._viewDate.clone().month(index), 'M')) {
1953
- $(this).addClass('disabled');
1954
- }
1955
- });
1956
- };
1957
-
1958
- TempusDominusBootstrap4.prototype._getStartEndYear = function _getStartEndYear(factor, year) {
1959
- var step = factor / 10,
1960
- startYear = Math.floor(year / factor) * factor,
1961
- endYear = startYear + step * 9,
1962
- focusValue = Math.floor(year / step) * step;
1963
- return [startYear, endYear, focusValue];
1964
- };
1965
-
1966
- TempusDominusBootstrap4.prototype._updateYears = function _updateYears() {
1967
- var yearsView = this.widget.find('.datepicker-years'),
1968
- yearsViewHeader = yearsView.find('th'),
1969
- yearCaps = this._getStartEndYear(10, this._viewDate.year()),
1970
- startYear = this._viewDate.clone().year(yearCaps[0]),
1971
- endYear = this._viewDate.clone().year(yearCaps[1]);
1972
- var html = '';
1973
-
1974
- yearsViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevDecade);
1975
- yearsViewHeader.eq(1).attr('title', this._options.tooltips.selectDecade);
1976
- yearsViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextDecade);
1977
-
1978
- yearsView.find('.disabled').removeClass('disabled');
1979
-
1980
- if (this._options.minDate && this._options.minDate.isAfter(startYear, 'y')) {
1981
- yearsViewHeader.eq(0).addClass('disabled');
1982
- }
1983
-
1984
- yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());
1985
-
1986
- if (this._options.maxDate && this._options.maxDate.isBefore(endYear, 'y')) {
1987
- yearsViewHeader.eq(2).addClass('disabled');
1988
- }
1989
-
1990
- html += '<span data-action="selectYear" class="year old' + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + (startYear.year() - 1) + '</span>';
1991
- while (!startYear.isAfter(endYear, 'y')) {
1992
- html += '<span data-action="selectYear" class="year' + (startYear.isSame(this._getLastPickedDate(), 'y') && !this.unset ? ' active' : '') + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
1993
- startYear.add(1, 'y');
1994
- }
1995
- html += '<span data-action="selectYear" class="year old' + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
1996
-
1997
- yearsView.find('td').html(html);
1998
- };
1999
-
2000
- TempusDominusBootstrap4.prototype._updateDecades = function _updateDecades() {
2001
- var decadesView = this.widget.find('.datepicker-decades'),
2002
- decadesViewHeader = decadesView.find('th'),
2003
- yearCaps = this._getStartEndYear(100, this._viewDate.year()),
2004
- startDecade = this._viewDate.clone().year(yearCaps[0]),
2005
- endDecade = this._viewDate.clone().year(yearCaps[1]);
2006
- var minDateDecade = false,
2007
- maxDateDecade = false,
2008
- endDecadeYear = void 0,
2009
- html = '';
2010
-
2011
- decadesViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevCentury);
2012
- decadesViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextCentury);
2013
-
2014
- decadesView.find('.disabled').removeClass('disabled');
2015
-
2016
- if (startDecade.year() === 0 || this._options.minDate && this._options.minDate.isAfter(startDecade, 'y')) {
2017
- decadesViewHeader.eq(0).addClass('disabled');
2018
- }
2019
-
2020
- decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());
2021
-
2022
- if (this._options.maxDate && this._options.maxDate.isBefore(endDecade, 'y')) {
2023
- decadesViewHeader.eq(2).addClass('disabled');
2024
- }
2025
-
2026
- if (startDecade.year() - 10 < 0) {
2027
- html += '<span>&nbsp;</span>';
2028
- } else {
2029
- html += '<span data-action="selectDecade" class="decade old" data-selection="' + (startDecade.year() + 6) + '">' + (startDecade.year() - 10) + '</span>';
2030
- }
2031
-
2032
- while (!startDecade.isAfter(endDecade, 'y')) {
2033
- endDecadeYear = startDecade.year() + 11;
2034
- minDateDecade = this._options.minDate && this._options.minDate.isAfter(startDecade, 'y') && this._options.minDate.year() <= endDecadeYear;
2035
- maxDateDecade = this._options.maxDate && this._options.maxDate.isAfter(startDecade, 'y') && this._options.maxDate.year() <= endDecadeYear;
2036
- html += '<span data-action="selectDecade" class="decade' + (this._getLastPickedDate().isAfter(startDecade) && this._getLastPickedDate().year() <= endDecadeYear ? ' active' : '') + (!this._isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade ? ' disabled' : '') + '" data-selection="' + (startDecade.year() + 6) + '">' + startDecade.year() + '</span>';
2037
- startDecade.add(10, 'y');
2038
- }
2039
- html += '<span data-action="selectDecade" class="decade old" data-selection="' + (startDecade.year() + 6) + '">' + startDecade.year() + '</span>';
2040
-
2041
- decadesView.find('td').html(html);
2042
- };
2043
-
2044
- TempusDominusBootstrap4.prototype._fillDate = function _fillDate() {
2045
- var daysView = this.widget.find('.datepicker-days'),
2046
- daysViewHeader = daysView.find('th'),
2047
- html = [];
2048
- var currentDate = void 0,
2049
- row = void 0,
2050
- clsName = void 0,
2051
- i = void 0;
2052
-
2053
- if (!this._hasDate()) {
2054
- return;
2055
- }
2056
-
2057
- daysViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevMonth);
2058
- daysViewHeader.eq(1).attr('title', this._options.tooltips.selectMonth);
2059
- daysViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextMonth);
2060
-
2061
- daysView.find('.disabled').removeClass('disabled');
2062
- daysViewHeader.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat));
2063
-
2064
- if (!this._isValid(this._viewDate.clone().subtract(1, 'M'), 'M')) {
2065
- daysViewHeader.eq(0).addClass('disabled');
2066
- }
2067
- if (!this._isValid(this._viewDate.clone().add(1, 'M'), 'M')) {
2068
- daysViewHeader.eq(2).addClass('disabled');
2069
- }
2070
-
2071
- currentDate = this._viewDate.clone().startOf('M').startOf('w').startOf('d');
2072
-
2073
- for (i = 0; i < 42; i++) {
2074
- //always display 42 days (should show 6 weeks)
2075
- if (currentDate.weekday() === 0) {
2076
- row = $('<tr>');
2077
- if (this._options.calendarWeeks) {
2078
- row.append('<td class="cw">' + currentDate.week() + '</td>');
2079
- }
2080
- html.push(row);
2081
- }
2082
- clsName = '';
2083
- if (currentDate.isBefore(this._viewDate, 'M')) {
2084
- clsName += ' old';
2085
- }
2086
- if (currentDate.isAfter(this._viewDate, 'M')) {
2087
- clsName += ' new';
2088
- }
2089
- if (this._options.allowMultidate) {
2090
- var index = this._datesFormatted.indexOf(currentDate.format('YYYY-MM-DD'));
2091
- if (index !== -1) {
2092
- if (currentDate.isSame(this._datesFormatted[index], 'd') && !this.unset) {
2093
- clsName += ' active';
2094
- }
2095
- }
2096
- } else {
2097
- if (currentDate.isSame(this._getLastPickedDate(), 'd') && !this.unset) {
2098
- clsName += ' active';
2099
- }
2100
- }
2101
- if (!this._isValid(currentDate, 'd')) {
2102
- clsName += ' disabled';
2103
- }
2104
- if (currentDate.isSame(this.getMoment(), 'd')) {
2105
- clsName += ' today';
2106
- }
2107
- if (currentDate.day() === 0 || currentDate.day() === 6) {
2108
- clsName += ' weekend';
2109
- }
2110
- row.append('<td data-action="selectDay" data-day="' + currentDate.format('L') + '" class="day' + clsName + '">' + currentDate.date() + '</td>');
2111
- currentDate.add(1, 'd');
2112
- }
2113
-
2114
- daysView.find('tbody').empty().append(html);
2115
-
2116
- this._updateMonths();
2117
-
2118
- this._updateYears();
2119
-
2120
- this._updateDecades();
2121
- };
2122
-
2123
- TempusDominusBootstrap4.prototype._fillHours = function _fillHours() {
2124
- var table = this.widget.find('.timepicker-hours table'),
2125
- currentHour = this._viewDate.clone().startOf('d'),
2126
- html = [];
2127
- var row = $('<tr>');
2128
-
2129
- if (this._viewDate.hour() > 11 && !this.use24Hours) {
2130
- currentHour.hour(12);
2131
- }
2132
- while (currentHour.isSame(this._viewDate, 'd') && (this.use24Hours || this._viewDate.hour() < 12 && currentHour.hour() < 12 || this._viewDate.hour() > 11)) {
2133
- if (currentHour.hour() % 4 === 0) {
2134
- row = $('<tr>');
2135
- html.push(row);
2136
- }
2137
- row.append('<td data-action="selectHour" class="hour' + (!this._isValid(currentHour, 'h') ? ' disabled' : '') + '">' + currentHour.format(this.use24Hours ? 'HH' : 'hh') + '</td>');
2138
- currentHour.add(1, 'h');
2139
- }
2140
- table.empty().append(html);
2141
- };
2142
-
2143
- TempusDominusBootstrap4.prototype._fillMinutes = function _fillMinutes() {
2144
- var table = this.widget.find('.timepicker-minutes table'),
2145
- currentMinute = this._viewDate.clone().startOf('h'),
2146
- html = [],
2147
- step = this._options.stepping === 1 ? 5 : this._options.stepping;
2148
- var row = $('<tr>');
2149
-
2150
- while (this._viewDate.isSame(currentMinute, 'h')) {
2151
- if (currentMinute.minute() % (step * 4) === 0) {
2152
- row = $('<tr>');
2153
- html.push(row);
2154
- }
2155
- row.append('<td data-action="selectMinute" class="minute' + (!this._isValid(currentMinute, 'm') ? ' disabled' : '') + '">' + currentMinute.format('mm') + '</td>');
2156
- currentMinute.add(step, 'm');
2157
- }
2158
- table.empty().append(html);
2159
- };
2160
-
2161
- TempusDominusBootstrap4.prototype._fillSeconds = function _fillSeconds() {
2162
- var table = this.widget.find('.timepicker-seconds table'),
2163
- currentSecond = this._viewDate.clone().startOf('m'),
2164
- html = [];
2165
- var row = $('<tr>');
2166
-
2167
- while (this._viewDate.isSame(currentSecond, 'm')) {
2168
- if (currentSecond.second() % 20 === 0) {
2169
- row = $('<tr>');
2170
- html.push(row);
2171
- }
2172
- row.append('<td data-action="selectSecond" class="second' + (!this._isValid(currentSecond, 's') ? ' disabled' : '') + '">' + currentSecond.format('ss') + '</td>');
2173
- currentSecond.add(5, 's');
2174
- }
2175
-
2176
- table.empty().append(html);
2177
- };
2178
-
2179
- TempusDominusBootstrap4.prototype._fillTime = function _fillTime() {
2180
- var toggle = void 0,
2181
- newDate = void 0;
2182
- var timeComponents = this.widget.find('.timepicker span[data-time-component]');
2183
-
2184
- if (!this.use24Hours) {
2185
- toggle = this.widget.find('.timepicker [data-action=togglePeriod]');
2186
- newDate = this._getLastPickedDate().clone().add(this._getLastPickedDate().hours() >= 12 ? -12 : 12, 'h');
2187
-
2188
- toggle.text(this._getLastPickedDate().format('A'));
2189
-
2190
- if (this._isValid(newDate, 'h')) {
2191
- toggle.removeClass('disabled');
2192
- } else {
2193
- toggle.addClass('disabled');
2194
- }
2195
- }
2196
- timeComponents.filter('[data-time-component=hours]').text(this._getLastPickedDate().format('' + (this.use24Hours ? 'HH' : 'hh')));
2197
- timeComponents.filter('[data-time-component=minutes]').text(this._getLastPickedDate().format('mm'));
2198
- timeComponents.filter('[data-time-component=seconds]').text(this._getLastPickedDate().format('ss'));
2199
-
2200
- this._fillHours();
2201
- this._fillMinutes();
2202
- this._fillSeconds();
2203
- };
2204
-
2205
- TempusDominusBootstrap4.prototype._doAction = function _doAction(e, action) {
2206
- var lastPicked = this._getLastPickedDate();
2207
- if ($(e.currentTarget).is('.disabled')) {
2208
- return false;
2209
- }
2210
- action = action || $(e.currentTarget).data('action');
2211
- switch (action) {
2212
- case 'next':
2213
- {
2214
- var navFnc = DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;
2215
- this._viewDate.add(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP, navFnc);
2216
- this._fillDate();
2217
- this._viewUpdate(navFnc);
2218
- break;
2219
- }
2220
- case 'previous':
2221
- {
2222
- var _navFnc = DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;
2223
- this._viewDate.subtract(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP, _navFnc);
2224
- this._fillDate();
2225
- this._viewUpdate(_navFnc);
2226
- break;
2227
- }
2228
- case 'pickerSwitch':
2229
- this._showMode(1);
2230
- break;
2231
- case 'selectMonth':
2232
- {
2233
- var month = $(e.target).closest('tbody').find('span').index($(e.target));
2234
- this._viewDate.month(month);
2235
- if (this.currentViewMode === this.MinViewModeNumber) {
2236
- this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex());
2237
- if (!this._options.inline) {
2238
- this.hide();
2239
- }
2240
- } else {
2241
- this._showMode(-1);
2242
- this._fillDate();
2243
- }
2244
- this._viewUpdate('M');
2245
- break;
2246
- }
2247
- case 'selectYear':
2248
- {
2249
- var year = parseInt($(e.target).text(), 10) || 0;
2250
- this._viewDate.year(year);
2251
- if (this.currentViewMode === this.MinViewModeNumber) {
2252
- this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
2253
- if (!this._options.inline) {
2254
- this.hide();
2255
- }
2256
- } else {
2257
- this._showMode(-1);
2258
- this._fillDate();
2259
- }
2260
- this._viewUpdate('YYYY');
2261
- break;
2262
- }
2263
- case 'selectDecade':
2264
- {
2265
- var _year = parseInt($(e.target).data('selection'), 10) || 0;
2266
- this._viewDate.year(_year);
2267
- if (this.currentViewMode === this.MinViewModeNumber) {
2268
- this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
2269
- if (!this._options.inline) {
2270
- this.hide();
2271
- }
2272
- } else {
2273
- this._showMode(-1);
2274
- this._fillDate();
2275
- }
2276
- this._viewUpdate('YYYY');
2277
- break;
2278
- }
2279
- case 'selectDay':
2280
- {
2281
- var day = this._viewDate.clone();
2282
- if ($(e.target).is('.old')) {
2283
- day.subtract(1, 'M');
2284
- }
2285
- if ($(e.target).is('.new')) {
2286
- day.add(1, 'M');
2287
- }
2288
-
2289
- var selectDate = day.date(parseInt($(e.target).text(), 10)),
2290
- index = 0;
2291
- if (this._options.allowMultidate) {
2292
- index = this._datesFormatted.indexOf(selectDate.format('YYYY-MM-DD'));
2293
- if (index !== -1) {
2294
- this._setValue(null, index); //deselect multidate
2295
- } else {
2296
- this._setValue(selectDate, this._getLastPickedDateIndex() + 1);
2297
- }
2298
- } else {
2299
- this._setValue(selectDate, this._getLastPickedDateIndex());
2300
- }
2301
-
2302
- if (!this._hasTime() && !this._options.keepOpen && !this._options.inline && !this._options.allowMultidate) {
2303
- this.hide();
2304
- }
2305
- break;
2306
- }
2307
- case 'incrementHours':
2308
- {
2309
- var newDate = lastPicked.clone().add(1, 'h');
2310
- if (this._isValid(newDate, 'h')) {
2311
- this._setValue(newDate, this._getLastPickedDateIndex());
2312
- }
2313
- break;
2314
- }
2315
- case 'incrementMinutes':
2316
- {
2317
- var _newDate = lastPicked.clone().add(this._options.stepping, 'm');
2318
- if (this._isValid(_newDate, 'm')) {
2319
- this._setValue(_newDate, this._getLastPickedDateIndex());
2320
- }
2321
- break;
2322
- }
2323
- case 'incrementSeconds':
2324
- {
2325
- var _newDate2 = lastPicked.clone().add(1, 's');
2326
- if (this._isValid(_newDate2, 's')) {
2327
- this._setValue(_newDate2, this._getLastPickedDateIndex());
2328
- }
2329
- break;
2330
- }
2331
- case 'decrementHours':
2332
- {
2333
- var _newDate3 = lastPicked.clone().subtract(1, 'h');
2334
- if (this._isValid(_newDate3, 'h')) {
2335
- this._setValue(_newDate3, this._getLastPickedDateIndex());
2336
- }
2337
- break;
2338
- }
2339
- case 'decrementMinutes':
2340
- {
2341
- var _newDate4 = lastPicked.clone().subtract(this._options.stepping, 'm');
2342
- if (this._isValid(_newDate4, 'm')) {
2343
- this._setValue(_newDate4, this._getLastPickedDateIndex());
2344
- }
2345
- break;
2346
- }
2347
- case 'decrementSeconds':
2348
- {
2349
- var _newDate5 = lastPicked.clone().subtract(1, 's');
2350
- if (this._isValid(_newDate5, 's')) {
2351
- this._setValue(_newDate5, this._getLastPickedDateIndex());
2352
- }
2353
- break;
2354
- }
2355
- case 'togglePeriod':
2356
- {
2357
- this._setValue(lastPicked.clone().add(lastPicked.hours() >= 12 ? -12 : 12, 'h'), this._getLastPickedDateIndex());
2358
- break;
2359
- }
2360
- case 'togglePicker':
2361
- {
2362
- var $this = $(e.target),
2363
- $link = $this.closest('a'),
2364
- $parent = $this.closest('ul'),
2365
- expanded = $parent.find('.show'),
2366
- closed = $parent.find('.collapse:not(.show)'),
2367
- $span = $this.is('span') ? $this : $this.find('span');
2368
- var collapseData = void 0;
2369
-
2370
- if (expanded && expanded.length) {
2371
- collapseData = expanded.data('collapse');
2372
- if (collapseData && collapseData.transitioning) {
2373
- return true;
2374
- }
2375
- if (expanded.collapse) {
2376
- // if collapse plugin is available through bootstrap.js then use it
2377
- expanded.collapse('hide');
2378
- closed.collapse('show');
2379
- } else {
2380
- // otherwise just toggle in class on the two views
2381
- expanded.removeClass('show');
2382
- closed.addClass('show');
2383
- }
2384
- $span.toggleClass(this._options.icons.time + ' ' + this._options.icons.date);
2385
-
2386
- if ($span.hasClass(this._options.icons.date)) {
2387
- $link.attr('title', this._options.tooltips.selectDate);
2388
- } else {
2389
- $link.attr('title', this._options.tooltips.selectTime);
2390
- }
2391
- }
2392
- }
2393
- break;
2394
- case 'showPicker':
2395
- this.widget.find('.timepicker > div:not(.timepicker-picker)').hide();
2396
- this.widget.find('.timepicker .timepicker-picker').show();
2397
- break;
2398
- case 'showHours':
2399
- this.widget.find('.timepicker .timepicker-picker').hide();
2400
- this.widget.find('.timepicker .timepicker-hours').show();
2401
- break;
2402
- case 'showMinutes':
2403
- this.widget.find('.timepicker .timepicker-picker').hide();
2404
- this.widget.find('.timepicker .timepicker-minutes').show();
2405
- break;
2406
- case 'showSeconds':
2407
- this.widget.find('.timepicker .timepicker-picker').hide();
2408
- this.widget.find('.timepicker .timepicker-seconds').show();
2409
- break;
2410
- case 'selectHour':
2411
- {
2412
- var hour = parseInt($(e.target).text(), 10);
2413
-
2414
- if (!this.use24Hours) {
2415
- if (lastPicked.hours() >= 12) {
2416
- if (hour !== 12) {
2417
- hour += 12;
2418
- }
2419
- } else {
2420
- if (hour === 12) {
2421
- hour = 0;
2422
- }
2423
- }
2424
- }
2425
- this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
2426
- if (!this._isEnabled('a') && !this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
2427
- this.hide();
2428
- } else {
2429
- this._doAction(e, 'showPicker');
2430
- }
2431
- break;
2432
- }
2433
- case 'selectMinute':
2434
- this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2435
- if (!this._isEnabled('a') && !this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
2436
- this.hide();
2437
- } else {
2438
- this._doAction(e, 'showPicker');
2439
- }
2440
- break;
2441
- case 'selectSecond':
2442
- this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2443
- if (!this._isEnabled('a') && !this._options.keepOpen && !this._options.inline) {
2444
- this.hide();
2445
- } else {
2446
- this._doAction(e, 'showPicker');
2447
- }
2448
- break;
2449
- case 'clear':
2450
- this.clear();
2451
- break;
2452
- case 'close':
2453
- this.hide();
2454
- break;
2455
- case 'today':
2456
- {
2457
- var todaysDate = this.getMoment();
2458
- if (this._isValid(todaysDate, 'd')) {
2459
- this._setValue(todaysDate, this._getLastPickedDateIndex());
2460
- }
2461
- break;
2462
- }
2463
- }
2464
- return false;
2465
- };
2466
-
2467
- //public
2468
-
2469
-
2470
- TempusDominusBootstrap4.prototype.hide = function hide() {
2471
- var transitioning = false;
2472
- if (!this.widget) {
2473
- return;
2474
- }
2475
- // Ignore event if in the middle of a picker transition
2476
- this.widget.find('.collapse').each(function () {
2477
- var collapseData = $(this).data('collapse');
2478
- if (collapseData && collapseData.transitioning) {
2479
- transitioning = true;
2480
- return false;
2481
- }
2482
- return true;
2483
- });
2484
- if (transitioning) {
2485
- return;
2486
- }
2487
- if (this.component && this.component.hasClass('btn')) {
2488
- this.component.toggleClass('active');
2489
- }
2490
- this.widget.hide();
2491
-
2492
- $(window).off('resize', this._place());
2493
- this.widget.off('click', '[data-action]');
2494
- this.widget.off('mousedown', false);
2495
-
2496
- this.widget.remove();
2497
- this.widget = false;
2498
-
2499
- this._notifyEvent({
2500
- type: DateTimePicker.Event.HIDE,
2501
- date: this._getLastPickedDate().clone()
2502
- });
2503
-
2504
- if (this.input !== undefined) {
2505
- this.input.blur();
2506
- }
2507
-
2508
- this._viewDate = this._getLastPickedDate().clone();
2509
- };
2510
-
2511
- TempusDominusBootstrap4.prototype.show = function show() {
2512
- var currentMoment = void 0;
2513
- var useCurrentGranularity = {
2514
- 'year': function year(m) {
2515
- return m.month(0).date(1).hours(0).seconds(0).minutes(0);
2516
- },
2517
- 'month': function month(m) {
2518
- return m.date(1).hours(0).seconds(0).minutes(0);
2519
- },
2520
- 'day': function day(m) {
2521
- return m.hours(0).seconds(0).minutes(0);
2522
- },
2523
- 'hour': function hour(m) {
2524
- return m.seconds(0).minutes(0);
2525
- },
2526
- 'minute': function minute(m) {
2527
- return m.seconds(0);
2528
- }
2529
- };
2530
-
2531
- if (this.input !== undefined) {
2532
- if (this.input.prop('disabled') || !this._options.ignoreReadonly && this.input.prop('readonly') || this.widget) {
2533
- return;
2534
- }
2535
- if (this.input.val() !== undefined && this.input.val().trim().length !== 0) {
2536
- this._setValue(this._parseInputDate(this.input.val().trim()), 0);
2537
- } else if (this.unset && this._options.useCurrent) {
2538
- currentMoment = this.getMoment();
2539
- if (typeof this._options.useCurrent === 'string') {
2540
- currentMoment = useCurrentGranularity[this._options.useCurrent](currentMoment);
2541
- }
2542
- this._setValue(currentMoment, 0);
2543
- }
2544
- } else if (this.unset && this._options.useCurrent) {
2545
- currentMoment = this.getMoment();
2546
- if (typeof this._options.useCurrent === 'string') {
2547
- currentMoment = useCurrentGranularity[this._options.useCurrent](currentMoment);
2548
- }
2549
- this._setValue(currentMoment, 0);
2550
- }
2551
-
2552
- this.widget = this._getTemplate();
2553
-
2554
- this._fillDow();
2555
- this._fillMonths();
2556
-
2557
- this.widget.find('.timepicker-hours').hide();
2558
- this.widget.find('.timepicker-minutes').hide();
2559
- this.widget.find('.timepicker-seconds').hide();
2560
-
2561
- this._update();
2562
- this._showMode();
2563
-
2564
- $(window).on('resize', { picker: this }, this._place);
2565
- this.widget.on('click', '[data-action]', $.proxy(this._doAction, this)); // this handles clicks on the widget
2566
- this.widget.on('mousedown', false);
2567
-
2568
- if (this.component && this.component.hasClass('btn')) {
2569
- this.component.toggleClass('active');
2570
- }
2571
- this._place();
2572
- this.widget.show();
2573
- if (this.input !== undefined && this._options.focusOnShow && !this.input.is(':focus')) {
2574
- this.input.focus();
2575
- }
2576
-
2577
- this._notifyEvent({
2578
- type: DateTimePicker.Event.SHOW
2579
- });
2580
- };
2581
-
2582
- TempusDominusBootstrap4.prototype.destroy = function destroy() {
2583
- this.hide();
2584
- //todo doc off?
2585
- this._element.removeData(DateTimePicker.DATA_KEY);
2586
- this._element.removeData('date');
2587
- };
2588
-
2589
- TempusDominusBootstrap4.prototype.disable = function disable() {
2590
- this.hide();
2591
- if (this.component && this.component.hasClass('btn')) {
2592
- this.component.addClass('disabled');
2593
- }
2594
- if (this.input !== undefined) {
2595
- this.input.prop('disabled', true); //todo disable this/comp if input is null
2596
- }
2597
- };
2598
-
2599
- TempusDominusBootstrap4.prototype.enable = function enable() {
2600
- if (this.component && this.component.hasClass('btn')) {
2601
- this.component.removeClass('disabled');
2602
- }
2603
- if (this.input !== undefined) {
2604
- this.input.prop('disabled', false); //todo enable comp/this if input is null
2605
- }
2606
- };
2607
-
2608
- TempusDominusBootstrap4.prototype.toolbarPlacement = function toolbarPlacement(_toolbarPlacement) {
2609
- if (arguments.length === 0) {
2610
- return this._options.toolbarPlacement;
2611
- }
2612
-
2613
- if (typeof _toolbarPlacement !== 'string') {
2614
- throw new TypeError('toolbarPlacement() expects a string parameter');
2615
- }
2616
- if (toolbarPlacements.indexOf(_toolbarPlacement) === -1) {
2617
- throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');
2618
- }
2619
- this._options.toolbarPlacement = _toolbarPlacement;
2620
-
2621
- if (this.widget) {
2622
- this.hide();
2623
- this.show();
2624
- }
2625
- };
2626
-
2627
- TempusDominusBootstrap4.prototype.widgetPositioning = function widgetPositioning(_widgetPositioning) {
2628
- if (arguments.length === 0) {
2629
- return $.extend({}, this._options.widgetPositioning);
2630
- }
2631
-
2632
- if ({}.toString.call(_widgetPositioning) !== '[object Object]') {
2633
- throw new TypeError('widgetPositioning() expects an object variable');
2634
- }
2635
- if (_widgetPositioning.horizontal) {
2636
- if (typeof _widgetPositioning.horizontal !== 'string') {
2637
- throw new TypeError('widgetPositioning() horizontal variable must be a string');
2638
- }
2639
- _widgetPositioning.horizontal = _widgetPositioning.horizontal.toLowerCase();
2640
- if (horizontalModes.indexOf(_widgetPositioning.horizontal) === -1) {
2641
- throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');
2642
- }
2643
- this._options.widgetPositioning.horizontal = _widgetPositioning.horizontal;
2644
- }
2645
- if (_widgetPositioning.vertical) {
2646
- if (typeof _widgetPositioning.vertical !== 'string') {
2647
- throw new TypeError('widgetPositioning() vertical variable must be a string');
2648
- }
2649
- _widgetPositioning.vertical = _widgetPositioning.vertical.toLowerCase();
2650
- if (verticalModes.indexOf(_widgetPositioning.vertical) === -1) {
2651
- throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');
2652
- }
2653
- this._options.widgetPositioning.vertical = _widgetPositioning.vertical;
2654
- }
2655
- this._update();
2656
- };
2657
-
2658
- TempusDominusBootstrap4.prototype.widgetParent = function widgetParent(_widgetParent) {
2659
- if (arguments.length === 0) {
2660
- return this._options.widgetParent;
2661
- }
2662
-
2663
- if (typeof _widgetParent === 'string') {
2664
- _widgetParent = $(_widgetParent);
2665
- }
2666
-
2667
- if (_widgetParent !== null && typeof _widgetParent !== 'string' && !(_widgetParent instanceof $)) {
2668
- throw new TypeError('widgetParent() expects a string or a jQuery object parameter');
2669
- }
2670
-
2671
- this._options.widgetParent = _widgetParent;
2672
- if (this.widget) {
2673
- this.hide();
2674
- this.show();
2675
- }
2676
- };
2677
-
2678
- //static
2679
-
2680
-
2681
- TempusDominusBootstrap4._jQueryHandleThis = function _jQueryHandleThis(me, option, argument) {
2682
- var data = $(me).data(DateTimePicker.DATA_KEY);
2683
- if ((typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object') {
2684
- $.extend({}, DateTimePicker.Default, option);
2685
- }
2686
-
2687
- if (!data) {
2688
- data = new TempusDominusBootstrap4($(me), option);
2689
- $(me).data(DateTimePicker.DATA_KEY, data);
2690
- }
2691
-
2692
- if (typeof option === 'string') {
2693
- if (data[option] === undefined) {
2694
- throw new Error('No method named "' + option + '"');
2695
- }
2696
- if (argument === undefined) {
2697
- return data[option]();
2698
- } else {
2699
- return data[option](argument);
2700
- }
2701
- }
2702
- };
2703
-
2704
- TempusDominusBootstrap4._jQueryInterface = function _jQueryInterface(option, argument) {
2705
- if (this.length === 1) {
2706
- return TempusDominusBootstrap4._jQueryHandleThis(this[0], option, argument);
2707
- }
2708
- return this.each(function () {
2709
- TempusDominusBootstrap4._jQueryHandleThis(this, option, argument);
2710
- });
2711
- };
2712
-
2713
- return TempusDominusBootstrap4;
2714
- }(DateTimePicker);
2715
-
2716
- /**
2717
- * ------------------------------------------------------------------------
2718
- * jQuery
2719
- * ------------------------------------------------------------------------
2720
- */
2721
-
2722
-
2723
- $(document).on(DateTimePicker.Event.CLICK_DATA_API, DateTimePicker.Selector.DATA_TOGGLE, function () {
2724
- var $target = getSelectorFromElement($(this));
2725
- if ($target.length === 0) {
2726
- return;
2727
- }
2728
- TempusDominusBootstrap4._jQueryInterface.call($target, 'toggle');
2729
- }).on(DateTimePicker.Event.CHANGE, '.' + DateTimePicker.ClassName.INPUT, function (event) {
2730
- var $target = getSelectorFromElement($(this));
2731
- if ($target.length === 0) {
2732
- return;
2733
- }
2734
- TempusDominusBootstrap4._jQueryInterface.call($target, '_change', event);
2735
- }).on(DateTimePicker.Event.BLUR, '.' + DateTimePicker.ClassName.INPUT, function (event) {
2736
- var $target = getSelectorFromElement($(this)),
2737
- config = $target.data(DateTimePicker.DATA_KEY);
2738
- if ($target.length === 0) {
2739
- return;
2740
- }
2741
- if (config._options.debug || window.debug) {
2742
- return;
2743
- }
2744
- TempusDominusBootstrap4._jQueryInterface.call($target, 'hide', event);
2745
- }).on(DateTimePicker.Event.KEYDOWN, '.' + DateTimePicker.ClassName.INPUT, function (event) {
2746
- var $target = getSelectorFromElement($(this));
2747
- if ($target.length === 0) {
2748
- return;
2749
- }
2750
- TempusDominusBootstrap4._jQueryInterface.call($target, '_keydown', event);
2751
- }).on(DateTimePicker.Event.KEYUP, '.' + DateTimePicker.ClassName.INPUT, function (event) {
2752
- var $target = getSelectorFromElement($(this));
2753
- if ($target.length === 0) {
2754
- return;
2755
- }
2756
- TempusDominusBootstrap4._jQueryInterface.call($target, '_keyup', event);
2757
- }).on(DateTimePicker.Event.FOCUS, '.' + DateTimePicker.ClassName.INPUT, function (event) {
2758
- var $target = getSelectorFromElement($(this)),
2759
- config = $target.data(DateTimePicker.DATA_KEY);
2760
- if ($target.length === 0) {
2761
- return;
2762
- }
2763
- if (!config._options.allowInputToggle) {
2764
- return;
2765
- }
2766
- TempusDominusBootstrap4._jQueryInterface.call($target, 'show', event);
2767
- });
2768
-
2769
- $.fn[DateTimePicker.NAME] = TempusDominusBootstrap4._jQueryInterface;
2770
- $.fn[DateTimePicker.NAME].Constructor = TempusDominusBootstrap4;
2771
- $.fn[DateTimePicker.NAME].noConflict = function () {
2772
- $.fn[DateTimePicker.NAME] = JQUERY_NO_CONFLICT;
2773
- return TempusDominusBootstrap4._jQueryInterface;
2774
- };
2775
-
2776
- return TempusDominusBootstrap4;
2777
- }(jQuery);
2778
-
2779
- }();