Sha256: 23e5e36993e76f636b61300fe35ad0af08965c47673549e87e8254a67701bc00

Contents?: true

Size: 787 Bytes

Versions: 30

Compression:

Stored size: 787 Bytes

Contents

((exports) => {
  const formDatePicker = () => {
    $("[data-datepicker]").each((_index, node) => {
      const language = $("html").attr("lang") || "en";
      const initialDate = $(node).data("startdate") || "";
      const pickTime = $(node).data("timepicker") === "";
      const languageProps = $(node).fdatepicker.dates[language] && $(node).fdatepicker.dates[language].format;
      let format = $(node).data("date-format") || languageProps || "mm/dd/yyyy";

      $(node).fdatepicker({
        format,
        initialDate,
        language,
        pickTime,
        disableDblClickSelection: true,
        leftArrow: "<<",
        rightArrow: ">>"
      });
    });
  };

  exports.Decidim = exports.Decidim || {};
  exports.Decidim.formDatePicker = formDatePicker;
})(window);

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
decidim-core-0.19.0 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.17.2 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.18.0 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.17.1 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.16.1 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.17.0 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.16.0 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.15.2 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.15.1 vendor/assets/javascripts/form_datepicker.js.es6
decidim-core-0.15.0 vendor/assets/javascripts/form_datepicker.js.es6