Sha256: 4bd3f786bcb523818736a21736c400a0478eeb4fa15aaf0432c9f90822938cea

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

I"o(function() {
  if (typeof window.Alchemy === 'undefined') {
    window.Alchemy = {};
  }

  $.extend(Alchemy, {
    Datepicker: function(scope) {
      var $datepicker_inputs;
      $datepicker_inputs = $('input[data-datepicker-type]', scope);
      if (Alchemy.isiOS) {
        $datepicker_inputs.prop("type", function() {
          return $(this).data('datepicker-type');
        });
      } else {
        $datepicker_inputs.each(function() {
          var options, type;
          type = $(this).data('datepicker-type');
          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"),
            onValueUpdate: function(_selectedDates, _dateStr, instance) {
              return Alchemy.setElementDirty($(instance.element).closest(".element-editor"));
            }
          };
          return $(this).flatpickr(options);
        });
      }
    }
  });

}).call(this);
:ET

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
alchemy-devise-4.2.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/IZ/izi4TgYCqE_HUzQKZOEZaZNZ73f5_LSBjkG4Fa4sIzA.cache
alchemy-solidus-2.3.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/iZ/izi4TgYCqE_HUzQKZOEZaZNZ73f5_LSBjkG4Fa4sIzA.cache