Sha256: 80228fa48212e9c9951ce812fa7758ee8a342553a49912c41c1723b2b16b1df0

Contents?: true

Size: 675 Bytes

Versions: 31

Compression:

Stored size: 675 Bytes

Contents

/* eslint-disable require-jsdoc */

export default function 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: ">>"
    });
  });
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-core-0.26.1 app/packs/src/decidim/form_datepicker.js
decidim-core-0.26.0 app/packs/src/decidim/form_datepicker.js
decidim-core-0.26.0.rc2 app/packs/src/decidim/form_datepicker.js
decidim-core-0.26.0.rc1 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.2 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.1 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.0 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.0.rc4 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.0.rc3 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.0.rc2 app/packs/src/decidim/form_datepicker.js
decidim-core-0.25.0.rc1 app/packs/src/decidim/form_datepicker.js