PageSourceSearch

https://ungaguide.com/wp-content/themes/unga-guide-theme/dist/scripts/modules/datepicker.js

js ungaguide.com collected 2026-09-24 18:47:55 UTC 1,000 bytes, 38 lines download raw bytes

1export default function datepicker() {
2    const input = document.getElementById("event-date-range")
3
4    if (!input || !window.easepick || typeof window.easepick.create !== "function") {
5        return
6    }
7
8    const header = document.createElement("p")
9    header.textContent = "Select date range"
10
11    const picker = new window.easepick.create({
12        element: input,
13        css: [
14            "/wp-content/themes/unga-guide-theme/external/easepick.css",
15        ],
16        header,
17        zIndex: 9999,
18        firstDay: 0,
19        autoApply: false,
20        plugins: ['RangePlugin', "AmpPlugin"],
21        RangePlugin: {
22            delimiter: " to ",
23        },
24        AmpPlugin: {
25            resetButton: true,
26            darkMode: false,
27        }
28    })
29
30    const showPicker = () => {
31        if (picker && typeof picker.show === "function") {
32            picker.show()
33        }
34    }
35
36    input.addEventListener("click", showPicker)
37    input.addEventListener("focus", showPicker)
38}

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.