function getDatePicker(selector) {
    try {
        flatpickr(selector, {
            enableTime: true,
            dateFormat: "d/m/Y H:i",
            time_24hr: true,
            minDate: "today",
            disable: Array.isArray(window.disabledJadwalRanges) ? window.disabledJadwalRanges : [],
        });
    } catch (e) {
        // no-op
    }
}

getDatePicker("#startDate");
getDatePicker("#endDate");

getDatePicker("#editstartDate");
getDatePicker("#editendDate");
