PageSourceSearch

https://gomontag.com/_content/Blazorise/vendors/flatpickr-monthselect.js?v=2.2.2.0

js gomontag.com collected 2026-09-25 14:54:28 UTC 4,518 bytes, 1 lines download raw bytes

1!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).monthSelectPlugin = t() }(this, function () { "use strict"; var e = function () { return (e = Object.assign || function (e) { for (var t, n = 1, a = arguments.length; n < a; n++)for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]); return e }).apply(this, arguments) }, t = function (e, t, n) { return n.months[t ? "shorthand" : "longhand"][e] }; var n = { shorthand: !1, dateFormat: "F Y", altFormat: "F Y", theme: "light" }; return function (a) { var o = e(e({}, n), a); return function (e) { e.config.dateFormat = o.dateFormat, e.config.altFormat = o.altFormat; var n = { monthsContainer: null }; function a() { if (e.rContainer) { for (var t = e.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected"), n = 0; n < t.length; n++)t[n].classList.remove("selected"); var a = (e.selectedDates[0] || new Date).getMonth(), o = e.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child(" + (a + 1) + ")"); o && o.classList.add("selected") } } function r() { var t = e.selectedDates[0]; t && ((t = new Date(t)).setFullYear(e.currentYear), e.config.minDate && t < e.config.minDate && (t = e.config.minDate), e.config.maxDate && t > e.config.maxDate && (t = e.config.maxDate), e.currentYear = t.getFullYear()), e.currentYearElement.value = String(e.currentYear), e.rContainer && e.rContainer.querySelectorAll(".flatpickr-monthSelect-month").forEach(function (t) { t.dateObj.setFullYear(e.currentYear), e.config.minDate && t.dateObj < e.config.minDate || e.config.maxDate && t.dateObj > e.config.maxDate ? t.classList.add("disabled") : t.classList.remove("disabled") }), a() } function i(t) { t.preventDefault(), t.stopPropagation(); var n = function (e) { try { return "function" == typeof e.composedPath ? e.composedPath()[0] : e.target } catch (t) { return e.target } }(t); n instanceof Element && !n.classList.contains("disabled") && (c(n.dateObj), e.close()) } function c(t) { var n = new Date(t); n.setFullYear(e.currentYear), e.setDate(n, !0), a() } var l = { 37: -1, 39: 1, 40: 3, 38: -3 }; return { onParseConfig: function () { e.config.mode = "single", e.config.enableTime = !1 }, onValueUpdate: a, onKeyDown: function (t, a, o, r) { var i = void 0 !== l[r.keyCode]; if ((i || 13 === r.keyCode) && e.rContainer && n.monthsContainer) { var s = e.rContainer.querySelector(".flatpickr-monthSelect-month.selected"), d = Array.prototype.indexOf.call(n.monthsContainer.children, document.activeElement); if (-1 === d) { var f = s || n.monthsContainer.firstElementChild; f.focus(), d = f.$i } i ? n.monthsContainer.children[(12 + d + l[r.keyCode]) % 12].focus() : 13 === r.keyCode && n.monthsContainer.contains(document.activeElement) && c(document.activeElement.dateObj) } }, onReady: [function () { e.currentMonth = 0 }, function () { if (e.rContainer && e.daysContainer && e.weekdayContainer) { e.rContainer.removeChild(e.daysContainer), e.rContainer.removeChild(e.weekdayContainer); for (var t = 0; t < e.monthElements.length; t++) { var n = e.monthElements[t]; n.parentNode && n.parentNode.removeChild(n) } } }, function () { e._bind(e.prevMonthNav, "click", function (t) { t.preventDefault(), t.stopPropagation(), e.changeYear(e.currentYear - 1), r() }), e._bind(e.nextMonthNav, "click", function (t) { t.preventDefault(), t.stopPropagation(), e.changeYear(e.currentYear + 1), r() }) }, function () { if (e.rContainer) { n.monthsContainer = e._createElement("div", "flatpickr-monthSelect-months"), n.monthsContainer.tabIndex = -1, e.calendarContainer.classList.add("flatpickr-monthSelect-theme-" + o.theme); for (var a = 0; a < 12; a++) { var r = e._createElement("span", "flatpickr-monthSelect-month"); r.dateObj = new Date(e.currentYear, a), r.$i = a, r.textContent = t(a, o.shorthand, e.l10n), r.tabIndex = -1, r.addEventListener("click", i), n.monthsContainer.appendChild(r), (e.config.minDate && r.dateObj < e.config.minDate || e.config.maxDate && r.dateObj > e.config.maxDate) && r.classList.add("disabled") } e.rContainer.appendChild(n.monthsContainer) } }, a, function () { e.loadedPlugins.push("monthSelect") }], onDestroy: function () { if (null !== n.monthsContainer) for (var e = n.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month"), t = 0; t < e.length; t++)e[t].removeEventListener("click", i) } } } } });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.