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.
- checksums.yaml +4 -4
- data/README.md +12 -14
- data/lib/flatpickr/version.rb +1 -1
- data/vendor/assets/javascripts/flatpickr.js +2065 -2106
- data/vendor/assets/javascripts/flatpickr/l10n/ar.js +12 -35
- data/vendor/assets/javascripts/flatpickr/l10n/at.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/be.js +22 -58
- data/vendor/assets/javascripts/flatpickr/l10n/bg.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/bn.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/cat.js +34 -66
- data/vendor/assets/javascripts/flatpickr/l10n/cs.js +22 -58
- data/vendor/assets/javascripts/flatpickr/l10n/cy.js +23 -75
- data/vendor/assets/javascripts/flatpickr/l10n/da.js +18 -54
- data/vendor/assets/javascripts/flatpickr/l10n/de.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/default.js +35 -66
- data/vendor/assets/javascripts/flatpickr/l10n/eo.js +20 -56
- data/vendor/assets/javascripts/flatpickr/l10n/es.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/et.js +20 -56
- data/vendor/assets/javascripts/flatpickr/l10n/fa.js +16 -52
- data/vendor/assets/javascripts/flatpickr/l10n/fi.js +16 -52
- data/vendor/assets/javascripts/flatpickr/l10n/fr.js +21 -58
- data/vendor/assets/javascripts/flatpickr/l10n/gr.js +21 -57
- data/vendor/assets/javascripts/flatpickr/l10n/he.js +12 -40
- data/vendor/assets/javascripts/flatpickr/l10n/hi.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/hr.js +13 -49
- data/vendor/assets/javascripts/flatpickr/l10n/hu.js +19 -55
- data/vendor/assets/javascripts/flatpickr/l10n/id.js +16 -44
- data/vendor/assets/javascripts/flatpickr/l10n/index.js +963 -2805
- data/vendor/assets/javascripts/flatpickr/l10n/it.js +20 -54
- data/vendor/assets/javascripts/flatpickr/l10n/ja.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/km.js +21 -57
- data/vendor/assets/javascripts/flatpickr/l10n/ko.js +15 -51
- data/vendor/assets/javascripts/flatpickr/l10n/kz.js +22 -58
- data/vendor/assets/javascripts/flatpickr/l10n/lt.js +19 -55
- data/vendor/assets/javascripts/flatpickr/l10n/lv.js +14 -50
- data/vendor/assets/javascripts/flatpickr/l10n/mk.js +15 -51
- data/vendor/assets/javascripts/flatpickr/l10n/mn.js +14 -42
- data/vendor/assets/javascripts/flatpickr/l10n/ms.js +16 -52
- data/vendor/assets/javascripts/flatpickr/l10n/my.js +16 -52
- data/vendor/assets/javascripts/flatpickr/l10n/nl.js +21 -58
- data/vendor/assets/javascripts/flatpickr/l10n/no.js +20 -56
- data/vendor/assets/javascripts/flatpickr/l10n/pa.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/pl.js +20 -56
- data/vendor/assets/javascripts/flatpickr/l10n/pt.js +13 -49
- data/vendor/assets/javascripts/flatpickr/l10n/ro.js +16 -52
- data/vendor/assets/javascripts/flatpickr/l10n/ru.js +22 -58
- data/vendor/assets/javascripts/flatpickr/l10n/si.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/sk.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/sl.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/sq.js +12 -48
- data/vendor/assets/javascripts/flatpickr/l10n/sr.js +15 -51
- data/vendor/assets/javascripts/flatpickr/l10n/sv.js +17 -53
- data/vendor/assets/javascripts/flatpickr/l10n/th.js +19 -55
- data/vendor/assets/javascripts/flatpickr/l10n/tr.js +21 -57
- data/vendor/assets/javascripts/flatpickr/l10n/uk.js +13 -49
- data/vendor/assets/javascripts/flatpickr/l10n/vn.js +13 -49
- data/vendor/assets/javascripts/flatpickr/l10n/zh.js +16 -52
- data/vendor/assets/javascripts/flatpickr/plugins/confirmDate/confirmDate.js +32 -35
- data/vendor/assets/javascripts/flatpickr/plugins/labelPlugin/labelPlugin.js +18 -17
- data/vendor/assets/javascripts/flatpickr/plugins/minMaxTimePlugin.js +262 -251
- data/vendor/assets/javascripts/flatpickr/plugins/monthSelect/monthSelect.js +46 -63
- data/vendor/assets/javascripts/flatpickr/plugins/rangePlugin.js +134 -125
- data/vendor/assets/javascripts/flatpickr/plugins/scrollPlugin.js +44 -31
- data/vendor/assets/javascripts/flatpickr/plugins/weekSelect/weekSelect.js +63 -66
- metadata +3 -4
@@ -6,73 +6,70 @@
|
|
6
6
|
}(this, (function () { 'use strict';
|
7
7
|
|
8
8
|
function weekSelectPlugin() {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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.
|
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:
|
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
|
-
|
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.
|