flatpickr-ce 4.10.0 → 4.11.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.
- package/README.md +41 -1
- package/dist/esm/index.js +110 -59
- package/dist/esm/l10n/af.js +68 -0
- package/dist/esm/l10n/ar-dz.js +2 -1
- package/dist/esm/l10n/ar-sy.js +50 -0
- package/dist/esm/l10n/ar.js +1 -0
- package/dist/esm/l10n/az.js +1 -0
- package/dist/esm/l10n/br.js +1 -0
- package/dist/esm/l10n/da.js +1 -0
- package/dist/esm/l10n/de.js +1 -0
- package/dist/esm/l10n/default.js +1 -0
- package/dist/esm/l10n/es.js +1 -0
- package/dist/esm/l10n/eu.js +65 -0
- package/dist/esm/l10n/fi.js +1 -0
- package/dist/esm/l10n/fr.js +1 -0
- package/dist/esm/l10n/gl.js +1 -0
- package/dist/esm/l10n/gr.js +2 -1
- package/dist/esm/l10n/hy.js +1 -0
- package/dist/esm/l10n/index.js +11 -0
- package/dist/esm/l10n/ja.js +1 -0
- package/dist/esm/l10n/ko.js +1 -0
- package/dist/esm/l10n/pl.js +1 -0
- package/dist/esm/l10n/pt.js +1 -0
- package/dist/esm/l10n/sq.js +1 -0
- package/dist/esm/l10n/sv.js +1 -0
- package/dist/esm/l10n/tk.js +80 -0
- package/dist/esm/l10n/uk.js +1 -0
- package/dist/esm/l10n/zh.js +2 -0
- package/dist/esm/l10n/zh_tw.js +1 -0
- package/dist/esm/plugins/momentPlugin.js +2 -2
- package/dist/esm/plugins/rangePlugin.js +6 -0
- package/dist/esm/plugins/weekSelect/weekSelect.js +1 -0
- package/dist/esm/utils/dates.js +1 -1
- package/dist/flatpickr.css +2 -1
- package/dist/flatpickr.js +174 -69
- package/dist/flatpickr.min.css +1 -1
- package/dist/flatpickr.min.js +2 -2
- package/dist/l10n/af.d.ts +84 -0
- package/dist/l10n/af.js +81 -0
- package/dist/l10n/ar-dz.d.ts +6 -0
- package/dist/l10n/ar-dz.js +2 -1
- package/dist/l10n/ar-sy.d.ts +84 -0
- package/dist/l10n/ar-sy.js +63 -0
- package/dist/l10n/ar.d.ts +6 -0
- package/dist/l10n/ar.js +1 -0
- package/dist/l10n/at.d.ts +6 -0
- package/dist/l10n/az.d.ts +6 -0
- package/dist/l10n/az.js +1 -0
- package/dist/l10n/be.d.ts +6 -0
- package/dist/l10n/bg.d.ts +6 -0
- package/dist/l10n/bn.d.ts +6 -0
- package/dist/l10n/br.d.ts +6 -0
- package/dist/l10n/br.js +1 -0
- package/dist/l10n/bs.d.ts +6 -0
- package/dist/l10n/cat.d.ts +6 -0
- package/dist/l10n/ckb.d.ts +6 -0
- package/dist/l10n/cs.d.ts +6 -0
- package/dist/l10n/cy.d.ts +6 -0
- package/dist/l10n/da.d.ts +6 -0
- package/dist/l10n/da.js +1 -0
- package/dist/l10n/de.d.ts +6 -0
- package/dist/l10n/de.js +1 -0
- package/dist/l10n/default.js +1 -0
- package/dist/l10n/eo.d.ts +6 -0
- package/dist/l10n/es.d.ts +6 -0
- package/dist/l10n/es.js +1 -0
- package/dist/l10n/et.d.ts +6 -0
- package/dist/l10n/eu.d.ts +84 -0
- package/dist/l10n/eu.js +78 -0
- package/dist/l10n/fa.d.ts +6 -0
- package/dist/l10n/fi.d.ts +6 -0
- package/dist/l10n/fi.js +1 -0
- package/dist/l10n/fo.d.ts +6 -0
- package/dist/l10n/fr.d.ts +6 -0
- package/dist/l10n/fr.js +1 -0
- package/dist/l10n/ga.d.ts +6 -0
- package/dist/l10n/gl.d.ts +6 -0
- package/dist/l10n/gl.js +1 -0
- package/dist/l10n/gr.d.ts +6 -0
- package/dist/l10n/gr.js +2 -1
- package/dist/l10n/he.d.ts +6 -0
- package/dist/l10n/hi.d.ts +6 -0
- package/dist/l10n/hr.d.ts +6 -0
- package/dist/l10n/hu.d.ts +6 -0
- package/dist/l10n/hy.d.ts +6 -0
- package/dist/l10n/hy.js +1 -0
- package/dist/l10n/id.d.ts +6 -0
- package/dist/l10n/index.js +542 -197
- package/dist/l10n/is.d.ts +6 -0
- package/dist/l10n/it.d.ts +6 -0
- package/dist/l10n/ja.d.ts +6 -0
- package/dist/l10n/ja.js +1 -0
- package/dist/l10n/ka.d.ts +6 -0
- package/dist/l10n/km.d.ts +6 -0
- package/dist/l10n/ko.d.ts +6 -0
- package/dist/l10n/ko.js +1 -0
- package/dist/l10n/kz.d.ts +6 -0
- package/dist/l10n/lt.d.ts +6 -0
- package/dist/l10n/lv.d.ts +6 -0
- package/dist/l10n/mk.d.ts +6 -0
- package/dist/l10n/mn.d.ts +6 -0
- package/dist/l10n/ms.d.ts +6 -0
- package/dist/l10n/my.d.ts +6 -0
- package/dist/l10n/nl.d.ts +6 -0
- package/dist/l10n/nn.d.ts +6 -0
- package/dist/l10n/no.d.ts +6 -0
- package/dist/l10n/pa.d.ts +6 -0
- package/dist/l10n/pl.d.ts +6 -0
- package/dist/l10n/pl.js +1 -0
- package/dist/l10n/pt.d.ts +6 -0
- package/dist/l10n/pt.js +1 -0
- package/dist/l10n/ro.d.ts +6 -0
- package/dist/l10n/ru.d.ts +6 -0
- package/dist/l10n/si.d.ts +6 -0
- package/dist/l10n/sk.d.ts +6 -0
- package/dist/l10n/sl.d.ts +6 -0
- package/dist/l10n/sq.d.ts +6 -0
- package/dist/l10n/sq.js +1 -0
- package/dist/l10n/sr-cyr.d.ts +6 -0
- package/dist/l10n/sr.d.ts +6 -0
- package/dist/l10n/sv.d.ts +6 -0
- package/dist/l10n/sv.js +1 -0
- package/dist/l10n/tg.d.ts +6 -0
- package/dist/l10n/th.d.ts +6 -0
- package/dist/l10n/tk.d.ts +84 -0
- package/dist/l10n/tk.js +93 -0
- package/dist/l10n/tr.d.ts +6 -0
- package/dist/l10n/uk.d.ts +6 -0
- package/dist/l10n/uk.js +1 -0
- package/dist/l10n/uz.d.ts +6 -0
- package/dist/l10n/uz_latn.d.ts +6 -0
- package/dist/l10n/vn.d.ts +6 -0
- package/dist/l10n/zh.d.ts +6 -0
- package/dist/l10n/zh.js +2 -0
- package/dist/l10n/zh_tw.d.ts +6 -0
- package/dist/l10n/zh_tw.js +1 -0
- package/dist/plugins/minMaxTimePlugin.js +3 -1
- package/dist/plugins/momentPlugin.js +2 -2
- package/dist/plugins/rangePlugin.js +12 -0
- package/dist/plugins/weekSelect/weekSelect.js +2 -0
- package/dist/themes/airbnb.css +2 -1
- package/dist/themes/confetti.css +1 -0
- package/dist/themes/dark.css +1 -0
- package/dist/themes/light.css +1 -0
- package/dist/themes/material_blue.css +1 -0
- package/dist/themes/material_green.css +1 -0
- package/dist/themes/material_orange.css +1 -0
- package/dist/themes/material_red.css +1 -0
- package/dist/types/instance.d.ts +1 -0
- package/dist/types/locale.d.ts +3 -1
- package/package.json +6 -1
- package/src/style/flatpickr.styl +8 -1
package/dist/flatpickr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* flatpickr v4.
|
|
1
|
+
/* flatpickr v4.11.0, @license MIT */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -197,6 +197,7 @@
|
|
|
197
197
|
monthAriaLabel: "Month",
|
|
198
198
|
hourAriaLabel: "Hour",
|
|
199
199
|
minuteAriaLabel: "Minute",
|
|
200
|
+
secondAriaLabel: "Second",
|
|
200
201
|
time_24hr: false,
|
|
201
202
|
};
|
|
202
203
|
|
|
@@ -467,7 +468,8 @@
|
|
|
467
468
|
var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;
|
|
468
469
|
return function (dateObj, frmt, overrideLocale) {
|
|
469
470
|
var locale = overrideLocale || l10n;
|
|
470
|
-
|
|
471
|
+
// null, the default the docs list, leaves it unset like undefined (#2725)
|
|
472
|
+
if (config.formatDate && !isMobile) {
|
|
471
473
|
return config.formatDate(dateObj, frmt, locale);
|
|
472
474
|
}
|
|
473
475
|
return frmt
|
|
@@ -644,10 +646,14 @@
|
|
|
644
646
|
var DEBOUNCED_CHANGE_MS = 300;
|
|
645
647
|
// Instances created so far, which numbers their fields' ids
|
|
646
648
|
var instanceCount = 0;
|
|
649
|
+
// weekdays and months each hold two lists that are used apart, so a custom
|
|
650
|
+
// locale that gives only one of them keeps the other from the base locale
|
|
651
|
+
function mergeLocale(base, custom) {
|
|
652
|
+
return __assign(__assign(__assign({}, base), custom), { weekdays: __assign(__assign({}, base.weekdays), custom === null || custom === void 0 ? void 0 : custom.weekdays), months: __assign(__assign({}, base.months), custom === null || custom === void 0 ? void 0 : custom.months) });
|
|
653
|
+
}
|
|
647
654
|
function FlatpickrInstance(element, instanceConfig) {
|
|
648
655
|
var self = {
|
|
649
656
|
config: __assign(__assign({}, defaults), flatpickr.defaultConfig),
|
|
650
|
-
l10n: english,
|
|
651
657
|
};
|
|
652
658
|
// The options the user gave, at creation and through set(), as opposed to
|
|
653
659
|
// defaults
|
|
@@ -665,7 +671,6 @@
|
|
|
665
671
|
// Listeners on the document and the window, bound only while the calendar
|
|
666
672
|
// is open; kept apart from _handlers, which last until destroy()
|
|
667
673
|
var openHandlers = [];
|
|
668
|
-
self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
|
|
669
674
|
self._handlers = [];
|
|
670
675
|
self.pluginElements = [];
|
|
671
676
|
self.loadedPlugins = [];
|
|
@@ -674,6 +679,7 @@
|
|
|
674
679
|
self._positionCalendar = positionCalendar;
|
|
675
680
|
self._showValue = showValue;
|
|
676
681
|
self._typedValue = typedValue;
|
|
682
|
+
self._startNewRange = startNewRange;
|
|
677
683
|
self._getIncrement = getIncrement;
|
|
678
684
|
self.changeMonth = changeMonth;
|
|
679
685
|
self.changeYear = changeYear;
|
|
@@ -728,8 +734,10 @@
|
|
|
728
734
|
|
|
729
735
|
However, most browsers are not Safari and positioning is expensive when used
|
|
730
736
|
in scale. https://github.com/chmln/flatpickr/issues/1096
|
|
737
|
+
|
|
738
|
+
The page lays an inline calendar out: open() never positions it (#2787)
|
|
731
739
|
*/
|
|
732
|
-
if (!self.isMobile && isSafari) {
|
|
740
|
+
if (!self.isMobile && !self.config.inline && isSafari) {
|
|
733
741
|
positionCalendar();
|
|
734
742
|
}
|
|
735
743
|
triggerEvent("onReady");
|
|
@@ -881,6 +889,14 @@
|
|
|
881
889
|
setHours(date.getHours(), date.getMinutes(), date.getSeconds());
|
|
882
890
|
}
|
|
883
891
|
}
|
|
892
|
+
/**
|
|
893
|
+
* Puts the default time on the time inputs, the time a date picked while
|
|
894
|
+
* none is selected gets
|
|
895
|
+
*/
|
|
896
|
+
function setDefaultHours() {
|
|
897
|
+
var _a = getDefaultHours(self.config, defaultTimeDate()), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;
|
|
898
|
+
setHours(hours, minutes, seconds);
|
|
899
|
+
}
|
|
884
900
|
/**
|
|
885
901
|
* Sets the hours, minutes, and optionally seconds
|
|
886
902
|
* of the latest selected date object and the
|
|
@@ -952,7 +968,26 @@
|
|
|
952
968
|
};
|
|
953
969
|
if (!self.config.static)
|
|
954
970
|
listen(win, "resize", debounce(onResize, 50));
|
|
955
|
-
|
|
971
|
+
// A mouse press closes the calendar as it lands. On a touch screen, a
|
|
972
|
+
// touch or pen press closes it on a tap, which ends in pointerup; one that
|
|
973
|
+
// scrolls or zooms the page ends in pointercancel instead. touchstart
|
|
974
|
+
// can't tell the two apart: it's left only where pointer events are missing.
|
|
975
|
+
// The mouse is heard on pointerdown, not mousedown, which a tap also sends
|
|
976
|
+
// after its pointerup.
|
|
977
|
+
if (win.ontouchstart === undefined)
|
|
978
|
+
listen(doc, "mousedown", documentClick);
|
|
979
|
+
else if (win.PointerEvent === undefined)
|
|
980
|
+
listen(doc, "touchstart", documentClick);
|
|
981
|
+
else {
|
|
982
|
+
listen(doc, "pointerdown", function (e) {
|
|
983
|
+
if (e.pointerType === "mouse")
|
|
984
|
+
documentClick(e);
|
|
985
|
+
});
|
|
986
|
+
listen(doc, "pointerup", function (e) {
|
|
987
|
+
if (e.pointerType !== "mouse")
|
|
988
|
+
documentClick(e);
|
|
989
|
+
});
|
|
990
|
+
}
|
|
956
991
|
listen(doc, "focus", documentClick, { capture: true });
|
|
957
992
|
}
|
|
958
993
|
function unbindOpenEvents() {
|
|
@@ -1030,6 +1065,14 @@
|
|
|
1030
1065
|
return maxDate;
|
|
1031
1066
|
return date;
|
|
1032
1067
|
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Whether the date's month is one of the months the calendar shows
|
|
1070
|
+
*/
|
|
1071
|
+
function isMonthShown(date) {
|
|
1072
|
+
var firstMonth = self.currentYear * 12 + self.currentMonth;
|
|
1073
|
+
var month = date.getFullYear() * 12 + date.getMonth();
|
|
1074
|
+
return month >= firstMonth && month < firstMonth + self.config.showMonths;
|
|
1075
|
+
}
|
|
1033
1076
|
/**
|
|
1034
1077
|
* Set the calendar view to a particular date.
|
|
1035
1078
|
* @param {Date} jumpDate the date to set the view to
|
|
@@ -1135,14 +1178,14 @@
|
|
|
1135
1178
|
toggleClass(self.calendarContainer, "animate", self.config.animate === true);
|
|
1136
1179
|
toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1);
|
|
1137
1180
|
self.calendarContainer.appendChild(fragment);
|
|
1138
|
-
|
|
1139
|
-
|
|
1181
|
+
// null, the default the docs list, leaves it unset like undefined (#2725)
|
|
1182
|
+
var customAppend = !!self.config.appendTo && self.config.appendTo.nodeType !== undefined;
|
|
1140
1183
|
if (self.config.inline || self.config.static) {
|
|
1141
1184
|
self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
|
|
1142
1185
|
if (self.config.inline) {
|
|
1143
1186
|
if (!customAppend && self.element.parentNode)
|
|
1144
1187
|
self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);
|
|
1145
|
-
else if (self.config.appendTo
|
|
1188
|
+
else if (self.config.appendTo)
|
|
1146
1189
|
self.config.appendTo.appendChild(self.calendarContainer);
|
|
1147
1190
|
}
|
|
1148
1191
|
if (self.config.static) {
|
|
@@ -1157,9 +1200,7 @@
|
|
|
1157
1200
|
}
|
|
1158
1201
|
}
|
|
1159
1202
|
if (!self.config.static && !self.config.inline)
|
|
1160
|
-
(self.config.appendTo
|
|
1161
|
-
? self.config.appendTo
|
|
1162
|
-
: doc.body).appendChild(self.calendarContainer);
|
|
1203
|
+
(self.config.appendTo || doc.body).appendChild(self.calendarContainer);
|
|
1163
1204
|
}
|
|
1164
1205
|
function createDay(className, date, _dayNumber, i) {
|
|
1165
1206
|
var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", className, date.getDate().toString());
|
|
@@ -1508,6 +1549,7 @@
|
|
|
1508
1549
|
self.timeContainer.classList.add("hasSeconds");
|
|
1509
1550
|
var secondInput = createNumberInput("flatpickr-second", {
|
|
1510
1551
|
id: idPrefix + "-second",
|
|
1552
|
+
"aria-label": self.l10n.secondAriaLabel,
|
|
1511
1553
|
});
|
|
1512
1554
|
self.secondElement = secondInput.getElementsByTagName("input")[0];
|
|
1513
1555
|
self.secondElement.value = pad(self.latestSelectedDateObj
|
|
@@ -1573,8 +1615,15 @@
|
|
|
1573
1615
|
if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
|
|
1574
1616
|
weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));
|
|
1575
1617
|
}
|
|
1618
|
+
var _loop_1 = function (i) {
|
|
1619
|
+
var container = self.weekdayContainer.children[i];
|
|
1620
|
+
clearNode(container);
|
|
1621
|
+
weekdays.forEach(function (weekday) {
|
|
1622
|
+
return container.appendChild(createElement("span", "flatpickr-weekday", weekday));
|
|
1623
|
+
});
|
|
1624
|
+
};
|
|
1576
1625
|
for (var i = self.config.showMonths; i--;) {
|
|
1577
|
-
|
|
1626
|
+
_loop_1(i);
|
|
1578
1627
|
}
|
|
1579
1628
|
}
|
|
1580
1629
|
/* istanbul ignore next */
|
|
@@ -1620,16 +1669,26 @@
|
|
|
1620
1669
|
self.currentYear = initialDate.getFullYear();
|
|
1621
1670
|
self.currentMonth = initialDate.getMonth();
|
|
1622
1671
|
}
|
|
1623
|
-
if (self.config.enableTime === true)
|
|
1624
|
-
|
|
1625
|
-
setHours(hours, minutes, seconds);
|
|
1626
|
-
}
|
|
1672
|
+
if (self.config.enableTime === true)
|
|
1673
|
+
setDefaultHours();
|
|
1627
1674
|
self.redraw();
|
|
1628
1675
|
if (triggerChangeEvent)
|
|
1629
1676
|
// triggerChangeEvent is true (default) or an Event
|
|
1630
1677
|
triggerEvent("onChange");
|
|
1631
1678
|
}
|
|
1632
1679
|
function close() {
|
|
1680
|
+
// A calendar that closes showing none of its selected dates goes back to
|
|
1681
|
+
// latestSelectedDateObj (#2835); with none selected there is nowhere to go
|
|
1682
|
+
// back to, and one that isn't open, as an inline one, keeps its view. As
|
|
1683
|
+
// browsing does, the move is announced once the days are rebuilt, and
|
|
1684
|
+
// before onClose, which may move the view itself
|
|
1685
|
+
if (self.isOpen &&
|
|
1686
|
+
self.selectedDates.length > 0 &&
|
|
1687
|
+
!self.selectedDates.some(isMonthShown)) {
|
|
1688
|
+
var currentYear = self.currentYear, currentMonth = self.currentMonth;
|
|
1689
|
+
jumpToDate();
|
|
1690
|
+
triggerViewChange(currentYear, currentMonth);
|
|
1691
|
+
}
|
|
1633
1692
|
self.isOpen = false;
|
|
1634
1693
|
unbindOpenEvents();
|
|
1635
1694
|
if (!self.isMobile) {
|
|
@@ -1838,7 +1897,7 @@
|
|
|
1838
1897
|
* reads it from those
|
|
1839
1898
|
*/
|
|
1840
1899
|
function typedValue() {
|
|
1841
|
-
return self._input.value.
|
|
1900
|
+
return self._input.value.replace(/\s+$/, "") === getDateStr()
|
|
1842
1901
|
? undefined
|
|
1843
1902
|
: self._input.value;
|
|
1844
1903
|
}
|
|
@@ -2055,7 +2114,7 @@
|
|
|
2055
2114
|
maxRange = t;
|
|
2056
2115
|
}
|
|
2057
2116
|
}
|
|
2058
|
-
var hoverableCells = Array.
|
|
2117
|
+
var hoverableCells = Array.prototype.slice.call(self.rContainer.querySelectorAll("*:nth-child(-n+" + self.config.showMonths + ") > ." + cellClass));
|
|
2059
2118
|
hoverableCells.forEach(function (dayElem) {
|
|
2060
2119
|
var date = dayElem.dateObj;
|
|
2061
2120
|
var timestamp = date.getTime();
|
|
@@ -2103,8 +2162,20 @@
|
|
|
2103
2162
|
}
|
|
2104
2163
|
}
|
|
2105
2164
|
if (self.mobileInput !== undefined) {
|
|
2165
|
+
// focus() is what opens the picker on iOS, where showPicker() does
|
|
2166
|
+
// nothing for these inputs
|
|
2106
2167
|
self.mobileInput.focus();
|
|
2107
|
-
|
|
2168
|
+
// click() doesn't open it in Firefox for Android (#2726). showPicker()
|
|
2169
|
+
// is missing before Chrome 99, Firefox 101 and Safari 16 (and from
|
|
2170
|
+
// TypeScript 4.1's DOM types) and throws where it can't open it, as
|
|
2171
|
+
// without a user gesture, in a cross-origin iframe or on a disabled
|
|
2172
|
+
// input: click() then, as before
|
|
2173
|
+
try {
|
|
2174
|
+
self.mobileInput.showPicker();
|
|
2175
|
+
}
|
|
2176
|
+
catch (_a) {
|
|
2177
|
+
self.mobileInput.click();
|
|
2178
|
+
}
|
|
2108
2179
|
}
|
|
2109
2180
|
triggerEvent("onOpen");
|
|
2110
2181
|
return;
|
|
@@ -2148,8 +2219,10 @@
|
|
|
2148
2219
|
self.selectedDates.indexOf(self.latestSelectedDateObj) === -1)
|
|
2149
2220
|
self.latestSelectedDateObj =
|
|
2150
2221
|
self.selectedDates[self.selectedDates.length - 1];
|
|
2151
|
-
|
|
2152
|
-
|
|
2222
|
+
// with none selected, the time inputs show the default time, which
|
|
2223
|
+
// the new limit may hold, as after clear() (#1869)
|
|
2224
|
+
if (!self.selectedDates.length)
|
|
2225
|
+
setDefaultHours();
|
|
2153
2226
|
updateValue();
|
|
2154
2227
|
}
|
|
2155
2228
|
if (self.daysContainer) {
|
|
@@ -2168,6 +2241,7 @@
|
|
|
2168
2241
|
};
|
|
2169
2242
|
}
|
|
2170
2243
|
function parseConfig() {
|
|
2244
|
+
var _a;
|
|
2171
2245
|
var boolOpts = [
|
|
2172
2246
|
"wrap",
|
|
2173
2247
|
"weekNumbers",
|
|
@@ -2189,8 +2263,10 @@
|
|
|
2189
2263
|
self.config.formatDate = userConfig.formatDate;
|
|
2190
2264
|
Object.defineProperty(self.config, "enable", {
|
|
2191
2265
|
get: function () { return self.config._enable; },
|
|
2266
|
+
// null, like undefined, the default the docs list, leaves every date
|
|
2267
|
+
// enabled, where [] would enable none (#2725)
|
|
2192
2268
|
set: function (dates) {
|
|
2193
|
-
self.config._enable = parseDateRules(dates);
|
|
2269
|
+
self.config._enable = dates ? parseDateRules(dates) : undefined;
|
|
2194
2270
|
},
|
|
2195
2271
|
});
|
|
2196
2272
|
Object.defineProperty(self.config, "disable", {
|
|
@@ -2218,10 +2294,24 @@
|
|
|
2218
2294
|
get: function () { return self.config._maxTime; },
|
|
2219
2295
|
set: minMaxTimeSetter("max"),
|
|
2220
2296
|
});
|
|
2297
|
+
// null, the default the docs list, is the built-in ", " like undefined
|
|
2298
|
+
// (#2725); the write below puts the one from setDefaults() through it too
|
|
2299
|
+
var conjunction = self.config.conjunction;
|
|
2300
|
+
Object.defineProperty(self.config, "conjunction", {
|
|
2301
|
+
get: function () { return conjunction; },
|
|
2302
|
+
set: function (value) {
|
|
2303
|
+
conjunction = value !== null && value !== void 0 ? value : defaults.conjunction;
|
|
2304
|
+
},
|
|
2305
|
+
});
|
|
2306
|
+
self.config.conjunction = conjunction;
|
|
2221
2307
|
if (userConfig.mode === "time") {
|
|
2222
2308
|
self.config.noCalendar = true;
|
|
2223
2309
|
self.config.enableTime = true;
|
|
2224
2310
|
}
|
|
2311
|
+
// The date options are parsed as they're assigned, below and from the
|
|
2312
|
+
// plugins, with the names of the instance's locale, which setupLocale()
|
|
2313
|
+
// would only set up afterwards (#2721)
|
|
2314
|
+
setupL10n((_a = userConfig.locale) !== null && _a !== void 0 ? _a : self.config.locale);
|
|
2225
2315
|
Object.assign(self.config, defaultFormats(), userConfig);
|
|
2226
2316
|
for (var i = 0; i < boolOpts.length; i++)
|
|
2227
2317
|
// https://github.com/microsoft/TypeScript/issues/31663
|
|
@@ -2295,11 +2385,20 @@
|
|
|
2295
2385
|
if (typeof self.config.locale !== "object" &&
|
|
2296
2386
|
typeof flatpickr.l10ns[self.config.locale] === "undefined")
|
|
2297
2387
|
self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale));
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2388
|
+
setupL10n(self.config.locale);
|
|
2389
|
+
if (userConfig.time_24hr === undefined &&
|
|
2390
|
+
flatpickr.defaultConfig.time_24hr === undefined) {
|
|
2391
|
+
self.config.time_24hr = self.l10n.time_24hr;
|
|
2392
|
+
}
|
|
2393
|
+
self.formatDate = createDateFormatter(self);
|
|
2394
|
+
}
|
|
2395
|
+
// The instance's locale, and the parser that reads its names
|
|
2396
|
+
function setupL10n(locale) {
|
|
2397
|
+
self.l10n = mergeLocale(flatpickr.l10ns.default, typeof locale === "object"
|
|
2398
|
+
? locale
|
|
2399
|
+
: locale !== "default"
|
|
2400
|
+
? flatpickr.l10ns[locale]
|
|
2401
|
+
: undefined);
|
|
2303
2402
|
tokenRegex.D = "(" + self.l10n.weekdays.shorthand.join("|") + ")";
|
|
2304
2403
|
tokenRegex.l = "(" + self.l10n.weekdays.longhand.join("|") + ")";
|
|
2305
2404
|
tokenRegex.M = "(" + self.l10n.months.shorthand
|
|
@@ -2311,11 +2410,6 @@
|
|
|
2311
2410
|
.sort(function (a, b) { return b.length - a.length; })
|
|
2312
2411
|
.join("|") + ")";
|
|
2313
2412
|
tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + ")";
|
|
2314
|
-
if (userConfig.time_24hr === undefined &&
|
|
2315
|
-
flatpickr.defaultConfig.time_24hr === undefined) {
|
|
2316
|
-
self.config.time_24hr = self.l10n.time_24hr;
|
|
2317
|
-
}
|
|
2318
|
-
self.formatDate = createDateFormatter(self);
|
|
2319
2413
|
self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
|
|
2320
2414
|
}
|
|
2321
2415
|
function positionCalendar(customPositionElement) {
|
|
@@ -2326,7 +2420,7 @@
|
|
|
2326
2420
|
return;
|
|
2327
2421
|
triggerEvent("onPreCalendarPosition");
|
|
2328
2422
|
var positionElement = customPositionElement || self._positionElement;
|
|
2329
|
-
var calendarHeight =
|
|
2423
|
+
var calendarHeight = self.calendarContainer.offsetHeight, calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(" "), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = win.innerHeight - inputBounds.bottom, isAutoVertical = configPosVertical !== "above" && configPosVertical !== "below", fitsBelow = distanceFromBottom >= calendarHeight, fitsAbove = inputBounds.top > calendarHeight,
|
|
2330
2424
|
// the page can't always be scrolled to what sticks out of the viewport
|
|
2331
2425
|
// (scroll-locked modals, touch screens), so a calendar that fits
|
|
2332
2426
|
// neither above nor below goes on the roomier side, kept in the viewport
|
|
@@ -2433,6 +2527,15 @@
|
|
|
2433
2527
|
self.close();
|
|
2434
2528
|
}
|
|
2435
2529
|
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Makes way for a day picked on a range that has both ends: a new range,
|
|
2532
|
+
* from no dates and at the default time, which the day takes from the time
|
|
2533
|
+
* inputs. rangePlugin makes the pick an edit of one end, which keeps the
|
|
2534
|
+
* time the time inputs show for it
|
|
2535
|
+
*/
|
|
2536
|
+
function startNewRange() {
|
|
2537
|
+
self.clear(false, false);
|
|
2538
|
+
}
|
|
2436
2539
|
function selectDate(e) {
|
|
2437
2540
|
e.preventDefault();
|
|
2438
2541
|
e.stopPropagation();
|
|
@@ -2450,12 +2553,9 @@
|
|
|
2450
2553
|
if (t === undefined)
|
|
2451
2554
|
return;
|
|
2452
2555
|
var target = t;
|
|
2556
|
+
var prevTimes = getSelectedTimes();
|
|
2453
2557
|
var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));
|
|
2454
|
-
var
|
|
2455
|
-
var selectedMonth = selectedDate.getFullYear() * 12 + selectedDate.getMonth();
|
|
2456
|
-
var shouldChangeMonth = (selectedMonth < firstMonth ||
|
|
2457
|
-
selectedMonth > firstMonth + self.config.showMonths - 1) &&
|
|
2458
|
-
self.config.mode !== "range";
|
|
2558
|
+
var shouldChangeMonth = !isMonthShown(selectedDate) && self.config.mode !== "range";
|
|
2459
2559
|
self.selectedDateElem = target;
|
|
2460
2560
|
if (self.config.mode === "single")
|
|
2461
2561
|
self.selectedDates = [selectedDate];
|
|
@@ -2467,9 +2567,8 @@
|
|
|
2467
2567
|
self.selectedDates.push(selectedDate);
|
|
2468
2568
|
}
|
|
2469
2569
|
else if (self.config.mode === "range") {
|
|
2470
|
-
if (self.selectedDates.length === 2)
|
|
2471
|
-
self.
|
|
2472
|
-
}
|
|
2570
|
+
if (self.selectedDates.length === 2)
|
|
2571
|
+
self._startNewRange();
|
|
2473
2572
|
self.latestSelectedDateObj = selectedDate;
|
|
2474
2573
|
self.selectedDates.push(selectedDate);
|
|
2475
2574
|
// unless selecting same date twice, sort ascendingly
|
|
@@ -2490,17 +2589,12 @@
|
|
|
2490
2589
|
updateNavigationCurrentMonth();
|
|
2491
2590
|
buildDays();
|
|
2492
2591
|
updateValue();
|
|
2493
|
-
// maintain focus
|
|
2494
|
-
|
|
2495
|
-
self.config.mode !== "range" &&
|
|
2496
|
-
self.config.showMonths === 1)
|
|
2497
|
-
focusOnDayElem(target);
|
|
2498
|
-
else if (self.selectedDateElem !== undefined &&
|
|
2499
|
-
self.hourElement === undefined) {
|
|
2500
|
-
self.selectedDateElem && self.selectedDateElem.focus();
|
|
2501
|
-
}
|
|
2592
|
+
// maintain focus: buildDays() has replaced the day picked, so its new
|
|
2593
|
+
// cell is looked up by date (#2791)
|
|
2502
2594
|
if (self.hourElement !== undefined)
|
|
2503
|
-
self.hourElement
|
|
2595
|
+
self.hourElement.focus();
|
|
2596
|
+
else
|
|
2597
|
+
focusOnDay(getVisibleDay(selectedDate), 0);
|
|
2504
2598
|
if (self.config.closeOnSelect) {
|
|
2505
2599
|
var single = self.config.mode === "single" && !self.config.enableTime;
|
|
2506
2600
|
var range = self.config.mode === "range" &&
|
|
@@ -2510,7 +2604,11 @@
|
|
|
2510
2604
|
focusAndClose();
|
|
2511
2605
|
}
|
|
2512
2606
|
}
|
|
2513
|
-
|
|
2607
|
+
// announce only a change: a selected day picked again, or an end of a
|
|
2608
|
+
// range picked again with rangePlugin keeping the other, leaves the
|
|
2609
|
+
// dates as they were (#2700)
|
|
2610
|
+
if (getSelectedTimes() !== prevTimes)
|
|
2611
|
+
triggerChange();
|
|
2514
2612
|
}
|
|
2515
2613
|
var CALLBACKS = {
|
|
2516
2614
|
locale: [setupLocale, updateWeekdays, rebuildTime],
|
|
@@ -2741,34 +2839,41 @@
|
|
|
2741
2839
|
setMobileLimit("min");
|
|
2742
2840
|
setMobileLimit("max");
|
|
2743
2841
|
}
|
|
2744
|
-
// minDate or maxDate as the native input's min or max
|
|
2745
|
-
//
|
|
2746
|
-
//
|
|
2747
|
-
//
|
|
2748
|
-
//
|
|
2749
|
-
// max is cut to the one before. A date input holds no time, and raising min
|
|
2750
|
-
// there could move it a day on
|
|
2842
|
+
// minDate or maxDate as the native input's min or max (#2860). The native
|
|
2843
|
+
// picker offers only the times on the input's step: min is raised to the
|
|
2844
|
+
// next one, as flatpickr drops a value before minDate, and max is cut to the
|
|
2845
|
+
// one before. A date input holds no time, and raising min there could move
|
|
2846
|
+
// it a day on
|
|
2751
2847
|
function setMobileLimit(type) {
|
|
2752
2848
|
var mobileInput = self.mobileInput;
|
|
2753
2849
|
var limit = self.config[type + "Date"];
|
|
2754
2850
|
if (limit === undefined)
|
|
2755
2851
|
return mobileInput.removeAttribute(type);
|
|
2756
|
-
var date = new Date(limit.getTime());
|
|
2757
|
-
var unit = Number(mobileInput.step || 60) % 60 === 0 ? 60 : 1;
|
|
2758
2852
|
var round = type === "min" && mobileInput.type !== "date" ? Math.ceil : Math.floor;
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2853
|
+
mobileInput[type] = formatMobileDate(limit, round);
|
|
2854
|
+
}
|
|
2855
|
+
// A date in the native input's format, put on its step: on a whole minute
|
|
2856
|
+
// with a step of whole minutes, 60 s by default, and on a whole second with
|
|
2857
|
+
// a step of seconds (#2908). min is where the step counts from, and a value
|
|
2858
|
+
// off it is a step mismatch that keeps the form from submitting (#2393)
|
|
2859
|
+
function formatMobileDate(date, round) {
|
|
2860
|
+
if (round === void 0) { round = Math.floor; }
|
|
2861
|
+
var step = self.mobileInput.step;
|
|
2862
|
+
var unit = Number(step || 60) % 60 === 0 ? 60 : 1;
|
|
2863
|
+
var onStep = new Date(date.getTime());
|
|
2864
|
+
var seconds = onStep.getSeconds() + onStep.getMilliseconds() / 1000;
|
|
2865
|
+
onStep.setSeconds(round(seconds / unit) * unit, 0);
|
|
2866
|
+
return self.formatDate(onStep, self.mobileFormatStr);
|
|
2762
2867
|
}
|
|
2763
2868
|
function setupMobile() {
|
|
2764
2869
|
self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
|
|
2765
|
-
self.mobileInput.tabIndex =
|
|
2870
|
+
self.mobileInput.tabIndex = self.input.tabIndex;
|
|
2766
2871
|
setMobileInputType();
|
|
2767
2872
|
self.mobileInput.disabled = self.input.disabled;
|
|
2768
2873
|
self.mobileInput.required = self.input.required;
|
|
2769
2874
|
self.mobileInput.placeholder = self.input.placeholder;
|
|
2770
2875
|
if (self.selectedDates.length > 0) {
|
|
2771
|
-
self.mobileInput.defaultValue = self.mobileInput.value =
|
|
2876
|
+
self.mobileInput.defaultValue = self.mobileInput.value = formatMobileDate(self.selectedDates[0]);
|
|
2772
2877
|
}
|
|
2773
2878
|
self.input.type = "hidden";
|
|
2774
2879
|
if (self.altInput !== undefined)
|
|
@@ -2870,7 +2975,7 @@
|
|
|
2870
2975
|
if (triggerChange === void 0) { triggerChange = true; }
|
|
2871
2976
|
if (self.mobileInput !== undefined && self.mobileFormatStr) {
|
|
2872
2977
|
var mobileValue = self.latestSelectedDateObj !== undefined
|
|
2873
|
-
?
|
|
2978
|
+
? formatMobileDate(self.latestSelectedDateObj)
|
|
2874
2979
|
: "";
|
|
2875
2980
|
var currentDate = self.parseDate(self.mobileInput.value, self.mobileFormatStr);
|
|
2876
2981
|
// Browsers leave out zero seconds ("15:05", not "15:05:00"). Writing an
|
|
@@ -3016,7 +3121,7 @@
|
|
|
3016
3121
|
default: __assign({}, english),
|
|
3017
3122
|
};
|
|
3018
3123
|
flatpickr.localize = function (l10n) {
|
|
3019
|
-
flatpickr.l10ns.default =
|
|
3124
|
+
flatpickr.l10ns.default = mergeLocale(flatpickr.l10ns.default, l10n);
|
|
3020
3125
|
};
|
|
3021
3126
|
flatpickr.setDefaults = function (config) {
|
|
3022
3127
|
flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);
|
package/dist/flatpickr.min.css
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
/*rtl:begin:ignore*/
|
|
11
11
|
/*
|
|
12
12
|
/*rtl:end:ignore*/
|
|
13
|
-
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{background:transparent;border:none;border-radius:0;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|
|
13
|
+
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{background:transparent;border:none;border-radius:0;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:#fff;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden;display:inline-block}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|