Sha256: 07576091613d43b4ea6ddc86f9e1c66dd82054971baa0b0abe9753514c3c05d2

Contents?: true

Size: 579 Bytes

Versions: 11

Compression:

Stored size: 579 Bytes

Contents

$(document).on("page:change turbolinks:load",function(){

    $("input[data-alchemy-datepicker-type]").each(function(index,element){
        var  type = $(this).data('alchemy-datepicker-type');
        var options = {
            locale: Alchemy.locale.slice(0, 2),
            altInput: true,
            altFormat: Alchemy.t("formats."+type),
            altInputClass: "",
            enableTime: /time/.test(type),
            noCalendar: type == "time",
            time_24hr: Alchemy.t("formats.time_24hr"),

        };

        $(this).flatpickr(options);



    })



});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy-custom-model-3.2 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.5 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.4 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.3 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.2 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.1 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.1.0 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-2.2.2 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-3.0.0 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-2.2.1 app/assets/javascripts/backend/date_picker.js
alchemy-custom-model-2.2.0 app/assets/javascripts/backend/date_picker.js