flatpickr 4.5.2.0 → 4.5.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -14
  3. data/lib/flatpickr/version.rb +1 -1
  4. data/vendor/assets/javascripts/flatpickr.js +2065 -2106
  5. data/vendor/assets/javascripts/flatpickr/l10n/ar.js +12 -35
  6. data/vendor/assets/javascripts/flatpickr/l10n/at.js +17 -53
  7. data/vendor/assets/javascripts/flatpickr/l10n/be.js +22 -58
  8. data/vendor/assets/javascripts/flatpickr/l10n/bg.js +12 -48
  9. data/vendor/assets/javascripts/flatpickr/l10n/bn.js +12 -48
  10. data/vendor/assets/javascripts/flatpickr/l10n/cat.js +34 -66
  11. data/vendor/assets/javascripts/flatpickr/l10n/cs.js +22 -58
  12. data/vendor/assets/javascripts/flatpickr/l10n/cy.js +23 -75
  13. data/vendor/assets/javascripts/flatpickr/l10n/da.js +18 -54
  14. data/vendor/assets/javascripts/flatpickr/l10n/de.js +17 -53
  15. data/vendor/assets/javascripts/flatpickr/l10n/default.js +35 -66
  16. data/vendor/assets/javascripts/flatpickr/l10n/eo.js +20 -56
  17. data/vendor/assets/javascripts/flatpickr/l10n/es.js +17 -53
  18. data/vendor/assets/javascripts/flatpickr/l10n/et.js +20 -56
  19. data/vendor/assets/javascripts/flatpickr/l10n/fa.js +16 -52
  20. data/vendor/assets/javascripts/flatpickr/l10n/fi.js +16 -52
  21. data/vendor/assets/javascripts/flatpickr/l10n/fr.js +21 -58
  22. data/vendor/assets/javascripts/flatpickr/l10n/gr.js +21 -57
  23. data/vendor/assets/javascripts/flatpickr/l10n/he.js +12 -40
  24. data/vendor/assets/javascripts/flatpickr/l10n/hi.js +12 -48
  25. data/vendor/assets/javascripts/flatpickr/l10n/hr.js +13 -49
  26. data/vendor/assets/javascripts/flatpickr/l10n/hu.js +19 -55
  27. data/vendor/assets/javascripts/flatpickr/l10n/id.js +16 -44
  28. data/vendor/assets/javascripts/flatpickr/l10n/index.js +963 -2805
  29. data/vendor/assets/javascripts/flatpickr/l10n/it.js +20 -54
  30. data/vendor/assets/javascripts/flatpickr/l10n/ja.js +12 -48
  31. data/vendor/assets/javascripts/flatpickr/l10n/km.js +21 -57
  32. data/vendor/assets/javascripts/flatpickr/l10n/ko.js +15 -51
  33. data/vendor/assets/javascripts/flatpickr/l10n/kz.js +22 -58
  34. data/vendor/assets/javascripts/flatpickr/l10n/lt.js +19 -55
  35. data/vendor/assets/javascripts/flatpickr/l10n/lv.js +14 -50
  36. data/vendor/assets/javascripts/flatpickr/l10n/mk.js +15 -51
  37. data/vendor/assets/javascripts/flatpickr/l10n/mn.js +14 -42
  38. data/vendor/assets/javascripts/flatpickr/l10n/ms.js +16 -52
  39. data/vendor/assets/javascripts/flatpickr/l10n/my.js +16 -52
  40. data/vendor/assets/javascripts/flatpickr/l10n/nl.js +21 -58
  41. data/vendor/assets/javascripts/flatpickr/l10n/no.js +20 -56
  42. data/vendor/assets/javascripts/flatpickr/l10n/pa.js +12 -48
  43. data/vendor/assets/javascripts/flatpickr/l10n/pl.js +20 -56
  44. data/vendor/assets/javascripts/flatpickr/l10n/pt.js +13 -49
  45. data/vendor/assets/javascripts/flatpickr/l10n/ro.js +16 -52
  46. data/vendor/assets/javascripts/flatpickr/l10n/ru.js +22 -58
  47. data/vendor/assets/javascripts/flatpickr/l10n/si.js +12 -48
  48. data/vendor/assets/javascripts/flatpickr/l10n/sk.js +17 -53
  49. data/vendor/assets/javascripts/flatpickr/l10n/sl.js +17 -53
  50. data/vendor/assets/javascripts/flatpickr/l10n/sq.js +12 -48
  51. data/vendor/assets/javascripts/flatpickr/l10n/sr.js +15 -51
  52. data/vendor/assets/javascripts/flatpickr/l10n/sv.js +17 -53
  53. data/vendor/assets/javascripts/flatpickr/l10n/th.js +19 -55
  54. data/vendor/assets/javascripts/flatpickr/l10n/tr.js +21 -57
  55. data/vendor/assets/javascripts/flatpickr/l10n/uk.js +13 -49
  56. data/vendor/assets/javascripts/flatpickr/l10n/vn.js +13 -49
  57. data/vendor/assets/javascripts/flatpickr/l10n/zh.js +16 -52
  58. data/vendor/assets/javascripts/flatpickr/plugins/confirmDate/confirmDate.js +32 -35
  59. data/vendor/assets/javascripts/flatpickr/plugins/labelPlugin/labelPlugin.js +18 -17
  60. data/vendor/assets/javascripts/flatpickr/plugins/minMaxTimePlugin.js +262 -251
  61. data/vendor/assets/javascripts/flatpickr/plugins/monthSelect/monthSelect.js +46 -63
  62. data/vendor/assets/javascripts/flatpickr/plugins/rangePlugin.js +134 -125
  63. data/vendor/assets/javascripts/flatpickr/plugins/scrollPlugin.js +44 -31
  64. data/vendor/assets/javascripts/flatpickr/plugins/weekSelect/weekSelect.js +63 -66
  65. metadata +3 -4
@@ -6,73 +6,70 @@
6
6
  }(this, (function () { 'use strict';
7
7
 
8
8
  function weekSelectPlugin() {
9
- return function (fp) {
10
- function onDayHover(event) {
11
- const day = event.target;
12
- if (!day.classList.contains("flatpickr-day"))
13
- return;
14
- const days = fp.days.childNodes;
15
- const dayIndex = day.$i;
16
- const dayIndSeven = dayIndex / 7;
17
- const weekStartDay = days[7 * Math.floor(dayIndSeven)]
18
- .dateObj;
19
- const weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;
20
- for (let i = days.length; i--;) {
21
- const day = days[i];
22
- const date = day.dateObj;
23
- if (date > weekEndDay || date < weekStartDay)
24
- day.classList.remove("inRange");
25
- else
26
- day.classList.add("inRange");
27
- }
28
- }
29
- function highlightWeek() {
30
- const selDate = fp.latestSelectedDateObj;
31
- if (selDate !== undefined &&
32
- selDate.getMonth() === fp.currentMonth &&
33
- selDate.getFullYear() === fp.currentYear) {
34
- fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;
35
- fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;
36
- }
37
- const days = fp.days.childNodes;
38
- for (let i = days.length; i--;) {
39
- const date = days[i].dateObj;
40
- if (date >= fp.weekStartDay && date <= fp.weekEndDay)
41
- days[i].classList.add("week", "selected");
42
- }
43
- }
44
- function clearHover() {
45
- const days = fp.days.childNodes;
46
- for (let i = days.length; i--;)
47
- days[i].classList.remove("inRange");
48
- }
49
- function onReady() {
50
- if (fp.daysContainer !== undefined)
51
- fp.daysContainer.addEventListener("mouseover", onDayHover);
52
- }
53
- function onDestroy() {
54
- if (fp.daysContainer !== undefined)
55
- fp.daysContainer.removeEventListener("mouseover", onDayHover);
56
- }
57
- return {
58
- onValueUpdate: highlightWeek,
59
- onMonthChange: highlightWeek,
60
- onYearChange: highlightWeek,
61
- onClose: clearHover,
62
- onParseConfig: function () {
63
- fp.config.mode = "single";
64
- fp.config.enableTime = false;
65
- fp.config.dateFormat = fp.config.dateFormat
66
- ? fp.config.dateFormat
67
- : "\\W\\e\\e\\k #W, Y";
68
- fp.config.altFormat = fp.config.altFormat
69
- ? fp.config.altFormat
70
- : "\\W\\e\\e\\k #W, Y";
71
- },
72
- onReady: [onReady, highlightWeek],
73
- onDestroy,
74
- };
9
+ return function (fp) {
10
+ function onDayHover(event) {
11
+ var day = event.target;
12
+ if (!day.classList.contains("flatpickr-day")) return;
13
+ var days = fp.days.childNodes;
14
+ var dayIndex = day.$i;
15
+ var dayIndSeven = dayIndex / 7;
16
+ var weekStartDay = days[7 * Math.floor(dayIndSeven)].dateObj;
17
+ var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;
18
+
19
+ for (var i = days.length; i--;) {
20
+ var _day = days[i];
21
+ var date = _day.dateObj;
22
+ if (date > weekEndDay || date < weekStartDay) _day.classList.remove("inRange");else _day.classList.add("inRange");
23
+ }
24
+ }
25
+
26
+ function highlightWeek() {
27
+ var selDate = fp.latestSelectedDateObj;
28
+
29
+ if (selDate !== undefined && selDate.getMonth() === fp.currentMonth && selDate.getFullYear() === fp.currentYear) {
30
+ fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;
31
+ fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;
32
+ }
33
+
34
+ var days = fp.days.childNodes;
35
+
36
+ for (var i = days.length; i--;) {
37
+ var date = days[i].dateObj;
38
+ if (date >= fp.weekStartDay && date <= fp.weekEndDay) days[i].classList.add("week", "selected");
39
+ }
40
+ }
41
+
42
+ function clearHover() {
43
+ var days = fp.days.childNodes;
44
+
45
+ for (var i = days.length; i--;) {
46
+ days[i].classList.remove("inRange");
47
+ }
48
+ }
49
+
50
+ function onReady() {
51
+ if (fp.daysContainer !== undefined) fp.daysContainer.addEventListener("mouseover", onDayHover);
52
+ }
53
+
54
+ function onDestroy() {
55
+ if (fp.daysContainer !== undefined) fp.daysContainer.removeEventListener("mouseover", onDayHover);
56
+ }
57
+
58
+ return {
59
+ onValueUpdate: highlightWeek,
60
+ onMonthChange: highlightWeek,
61
+ onYearChange: highlightWeek,
62
+ onClose: clearHover,
63
+ onParseConfig: function onParseConfig() {
64
+ fp.config.mode = "single";
65
+ fp.config.enableTime = false;
66
+ fp.config.dateFormat = fp.config.dateFormat ? fp.config.dateFormat : "\\W\\e\\e\\k #W, Y";
67
+ fp.config.altFormat = fp.config.altFormat ? fp.config.altFormat : "\\W\\e\\e\\k #W, Y";
68
+ },
69
+ onReady: [onReady, highlightWeek],
70
+ onDestroy: onDestroy
75
71
  };
72
+ };
76
73
  }
77
74
 
78
75
  return weekSelectPlugin;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flatpickr
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.2.0
4
+ version: 4.5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2019-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,8 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubyforge_project:
168
- rubygems_version: 2.7.6
167
+ rubygems_version: 3.0.2
169
168
  signing_key:
170
169
  specification_version: 4
171
170
  summary: Flatpickr packaged for use in Rails projects.