import Datepicker from "flowbite-datepicker/Datepicker";
import localesJa from "../../../../../node_modules/flowbite-datepicker/js/i18n/locales/ja.js";

(Datepicker as any).locales.ja = localesJa.ja;

const options = {
    format: "yyyy/mm/dd",
    autohide: true,
    clearBtn: true,
    todayBtn: true,
    todayBtnMode: 1,
    language: "ja",
};

const inputElements =
    document.querySelectorAll<HTMLInputElement>(".datepicker");

for (const inputElement of inputElements) {
    const picker = new Datepicker(inputElement, options);
}
