flatpickr 4.6.6.0 → 4.6.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/lib/flatpickr/version.rb +1 -1
  3. data/package.json +5 -0
  4. data/vendor/assets/javascripts/flatpickr/l10n/ar.js +1 -1
  5. data/vendor/assets/javascripts/flatpickr/l10n/at.js +1 -1
  6. data/vendor/assets/javascripts/flatpickr/l10n/az.js +1 -1
  7. data/vendor/assets/javascripts/flatpickr/l10n/be.js +1 -1
  8. data/vendor/assets/javascripts/flatpickr/l10n/bg.js +1 -1
  9. data/vendor/assets/javascripts/flatpickr/l10n/bn.js +1 -1
  10. data/vendor/assets/javascripts/flatpickr/l10n/bs.js +1 -1
  11. data/vendor/assets/javascripts/flatpickr/l10n/cat.js +1 -1
  12. data/vendor/assets/javascripts/flatpickr/l10n/cs.js +1 -1
  13. data/vendor/assets/javascripts/flatpickr/l10n/cy.js +1 -1
  14. data/vendor/assets/javascripts/flatpickr/l10n/da.js +1 -1
  15. data/vendor/assets/javascripts/flatpickr/l10n/de.js +1 -1
  16. data/vendor/assets/javascripts/flatpickr/l10n/default.js +1 -1
  17. data/vendor/assets/javascripts/flatpickr/l10n/eo.js +1 -1
  18. data/vendor/assets/javascripts/flatpickr/l10n/es.js +1 -1
  19. data/vendor/assets/javascripts/flatpickr/l10n/et.js +1 -1
  20. data/vendor/assets/javascripts/flatpickr/l10n/fa.js +1 -1
  21. data/vendor/assets/javascripts/flatpickr/l10n/fi.js +1 -1
  22. data/vendor/assets/javascripts/flatpickr/l10n/fo.js +1 -1
  23. data/vendor/assets/javascripts/flatpickr/l10n/fr.js +1 -1
  24. data/vendor/assets/javascripts/flatpickr/l10n/ga.js +1 -1
  25. data/vendor/assets/javascripts/flatpickr/l10n/gr.js +1 -1
  26. data/vendor/assets/javascripts/flatpickr/l10n/he.js +1 -1
  27. data/vendor/assets/javascripts/flatpickr/l10n/hi.js +1 -1
  28. data/vendor/assets/javascripts/flatpickr/l10n/hr.js +1 -1
  29. data/vendor/assets/javascripts/flatpickr/l10n/hu.js +1 -1
  30. data/vendor/assets/javascripts/flatpickr/l10n/id.js +1 -1
  31. data/vendor/assets/javascripts/flatpickr/l10n/index.js +8 -4
  32. data/vendor/assets/javascripts/flatpickr/l10n/is.js +1 -1
  33. data/vendor/assets/javascripts/flatpickr/l10n/it.js +1 -1
  34. data/vendor/assets/javascripts/flatpickr/l10n/ja.js +6 -2
  35. data/vendor/assets/javascripts/flatpickr/l10n/ka.js +1 -1
  36. data/vendor/assets/javascripts/flatpickr/l10n/km.js +1 -1
  37. data/vendor/assets/javascripts/flatpickr/l10n/ko.js +1 -1
  38. data/vendor/assets/javascripts/flatpickr/l10n/kz.js +1 -1
  39. data/vendor/assets/javascripts/flatpickr/l10n/lt.js +1 -1
  40. data/vendor/assets/javascripts/flatpickr/l10n/lv.js +1 -1
  41. data/vendor/assets/javascripts/flatpickr/l10n/mk.js +1 -1
  42. data/vendor/assets/javascripts/flatpickr/l10n/mn.js +1 -1
  43. data/vendor/assets/javascripts/flatpickr/l10n/ms.js +1 -1
  44. data/vendor/assets/javascripts/flatpickr/l10n/my.js +1 -1
  45. data/vendor/assets/javascripts/flatpickr/l10n/nl.js +1 -1
  46. data/vendor/assets/javascripts/flatpickr/l10n/no.js +1 -1
  47. data/vendor/assets/javascripts/flatpickr/l10n/pa.js +1 -1
  48. data/vendor/assets/javascripts/flatpickr/l10n/pl.js +1 -1
  49. data/vendor/assets/javascripts/flatpickr/l10n/pt.js +1 -1
  50. data/vendor/assets/javascripts/flatpickr/l10n/ro.js +1 -1
  51. data/vendor/assets/javascripts/flatpickr/l10n/ru.js +1 -1
  52. data/vendor/assets/javascripts/flatpickr/l10n/si.js +1 -1
  53. data/vendor/assets/javascripts/flatpickr/l10n/sk.js +1 -1
  54. data/vendor/assets/javascripts/flatpickr/l10n/sl.js +1 -1
  55. data/vendor/assets/javascripts/flatpickr/l10n/sq.js +1 -1
  56. data/vendor/assets/javascripts/flatpickr/l10n/sr-cyr.js +1 -1
  57. data/vendor/assets/javascripts/flatpickr/l10n/sr.js +1 -1
  58. data/vendor/assets/javascripts/flatpickr/l10n/sv.js +1 -1
  59. data/vendor/assets/javascripts/flatpickr/l10n/th.js +1 -1
  60. data/vendor/assets/javascripts/flatpickr/l10n/tr.js +1 -1
  61. data/vendor/assets/javascripts/flatpickr/l10n/uk.js +1 -1
  62. data/vendor/assets/javascripts/flatpickr/l10n/uz.js +1 -1
  63. data/vendor/assets/javascripts/flatpickr/l10n/uz_latn.js +1 -1
  64. data/vendor/assets/javascripts/flatpickr/l10n/vn.js +3 -3
  65. data/vendor/assets/javascripts/flatpickr/l10n/zh-tw.js +1 -1
  66. data/vendor/assets/javascripts/flatpickr/l10n/zh.js +1 -1
  67. data/vendor/assets/javascripts/flatpickr/plugins/confirmDate/confirmDate.js +1 -1
  68. data/vendor/assets/javascripts/flatpickr/plugins/labelPlugin/labelPlugin.js +1 -1
  69. data/vendor/assets/javascripts/flatpickr/plugins/minMaxTimePlugin.js +1 -3
  70. data/vendor/assets/javascripts/flatpickr/plugins/momentPlugin.js +1 -1
  71. data/vendor/assets/javascripts/flatpickr/plugins/monthSelect/index.js +9 -15
  72. data/vendor/assets/javascripts/flatpickr/plugins/rangePlugin.js +18 -16
  73. data/vendor/assets/javascripts/flatpickr/plugins/scrollPlugin.js +1 -1
  74. data/vendor/assets/javascripts/flatpickr/plugins/weekSelect/weekSelect.js +1 -1
  75. data/vendor/assets/javascripts/flatpickr.js +86 -71
  76. metadata +8 -7
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.sr = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sr = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.sv = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sv = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.th = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.th = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.tr = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.tr = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.uk = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.uk = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.uz = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.uz = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.uz_latn = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.uz_latn = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.vn = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.vn = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -48,8 +48,8 @@
48
48
  "Tháng tám",
49
49
  "Tháng chín",
50
50
  "Tháng mười",
51
- "Tháng 11",
52
- "Tháng 12",
51
+ "Tháng mười một",
52
+ "Tháng mười hai",
53
53
  ],
54
54
  },
55
55
  firstDayOfWeek: 1,
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global['zh-tw'] = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['zh-tw'] = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.zh = {}));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.zh = {}));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var fp = typeof window !== "undefined" && window.flatpickr !== undefined
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.confirmDatePlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.confirmDatePlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.labelPlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.labelPlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  function labelPlugin() {
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.minMaxTimePlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.minMaxTimePlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  var pad = function (number, length) {
@@ -77,7 +77,6 @@
77
77
 
78
78
  var defaults = {
79
79
  _disable: [],
80
- _enable: [],
81
80
  allowInput: false,
82
81
  allowInvalidPreload: false,
83
82
  altFormat: "F j, Y",
@@ -96,7 +95,6 @@
96
95
  defaultSeconds: 0,
97
96
  disable: [],
98
97
  disableMobile: false,
99
- enable: [],
100
98
  enableSeconds: false,
101
99
  enableTime: false,
102
100
  errorHandler: function (err) {
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.momentPlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.momentPlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  function getEventTarget(event) {
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.monthSelectPlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.monthSelectPlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
@@ -71,23 +71,15 @@
71
71
  }
72
72
  function addListeners() {
73
73
  fp._bind(fp.prevMonthNav, "click", function (e) {
74
- var _a;
75
74
  e.preventDefault();
76
75
  e.stopPropagation();
77
- var selectedMonth = (_a = fp.rContainer) === null || _a === void 0 ? void 0 : _a.querySelector(".flatpickr-monthSelect-month.selected").dateObj.getMonth();
78
- if (selectedMonth === 0) {
79
- fp.currentYear--;
80
- }
76
+ fp.changeYear(fp.currentYear - 1);
81
77
  selectYear();
82
78
  });
83
79
  fp._bind(fp.nextMonthNav, "click", function (e) {
84
- var _a;
85
80
  e.preventDefault();
86
81
  e.stopPropagation();
87
- var selectedMonth = (_a = fp.rContainer) === null || _a === void 0 ? void 0 : _a.querySelector(".flatpickr-monthSelect-month.selected").dateObj.getMonth();
88
- if (selectedMonth === 11) {
89
- fp.currentYear++;
90
- }
82
+ fp.changeYear(fp.currentYear + 1);
91
83
  selectYear();
92
84
  });
93
85
  }
@@ -119,7 +111,8 @@
119
111
  for (var index = 0; index < currentlySelected.length; index++) {
120
112
  currentlySelected[index].classList.remove("selected");
121
113
  }
122
- var month = fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child(" + (fp.currentMonth + 1) + ")");
114
+ var targetMonth = (fp.selectedDates[0] || new Date()).getMonth();
115
+ var month = fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child(" + (targetMonth + 1) + ")");
123
116
  if (month) {
124
117
  month.classList.add("selected");
125
118
  }
@@ -136,9 +129,8 @@
136
129
  selectedDate = fp.config.maxDate;
137
130
  }
138
131
  fp.currentYear = selectedDate.getFullYear();
139
- fp.currentYearElement.value = String(fp.currentYear);
140
- fp.currentMonth = selectedDate.getMonth();
141
132
  }
133
+ fp.currentYearElement.value = String(fp.currentYear);
142
134
  if (fp.rContainer) {
143
135
  var months = fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month");
144
136
  months.forEach(function (month) {
@@ -167,7 +159,6 @@
167
159
  function setMonth(date) {
168
160
  var selectedDate = new Date(date);
169
161
  selectedDate.setFullYear(fp.currentYear);
170
- fp.currentMonth = selectedDate.getMonth();
171
162
  fp.setDate(selectedDate, true);
172
163
  setCurrentlySelected();
173
164
  }
@@ -215,6 +206,9 @@
215
206
  onValueUpdate: setCurrentlySelected,
216
207
  onKeyDown: onKeyDown,
217
208
  onReady: [
209
+ function () {
210
+ fp.currentMonth = 0;
211
+ },
218
212
  clearUnnecessaryDOMElements,
219
213
  addListeners,
220
214
  addMonths,
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.rangePlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.rangePlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
@@ -56,21 +56,23 @@
56
56
  fp.selectedDates.push(parsedDate);
57
57
  }
58
58
  secondInput.setAttribute("data-fp-omit", "");
59
- fp._bind(secondInput, ["focus", "click"], function () {
60
- if (fp.selectedDates[1]) {
61
- fp.latestSelectedDateObj = fp.selectedDates[1];
62
- fp._setHoursFromDate(fp.selectedDates[1]);
63
- fp.jumpToDate(fp.selectedDates[1]);
64
- }
65
- _secondInputFocused = true;
66
- fp.isOpen = false;
67
- fp.open(undefined, config.position === "left" ? fp._input : secondInput);
68
- });
69
- fp._bind(fp._input, ["focus", "click"], function (e) {
70
- e.preventDefault();
71
- fp.isOpen = false;
72
- fp.open();
73
- });
59
+ if (fp.config.clickOpens) {
60
+ fp._bind(secondInput, ["focus", "click"], function () {
61
+ if (fp.selectedDates[1]) {
62
+ fp.latestSelectedDateObj = fp.selectedDates[1];
63
+ fp._setHoursFromDate(fp.selectedDates[1]);
64
+ fp.jumpToDate(fp.selectedDates[1]);
65
+ }
66
+ _secondInputFocused = true;
67
+ fp.isOpen = false;
68
+ fp.open(undefined, config.position === "left" ? fp._input : secondInput);
69
+ });
70
+ fp._bind(fp._input, ["focus", "click"], function (e) {
71
+ e.preventDefault();
72
+ fp.isOpen = false;
73
+ fp.open();
74
+ });
75
+ }
74
76
  if (fp.config.allowInput)
75
77
  fp._bind(secondInput, "keydown", function (e) {
76
78
  if (e.key === "Enter") {
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.scrollPlugin = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.scrollPlugin = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  function getEventTarget(event) {
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
3
  typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.weekSelect = factory());
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.weekSelect = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  function getEventTarget(event) {