Sha256: 43976e6a1829a209c5675221d562a19a62f10955f7487dc7c9dacd9d1d3ebaa6

Contents?: true

Size: 546 Bytes

Versions: 7

Compression:

Stored size: 546 Bytes

Contents

document.addEventListener('DOMContentLoaded', function() {
  flatpickr.setDefaults({
    altInput: true,
    time_24hr: true,
    altInputClass: 'flatpickr-alt-input',
    locale: Spree.translations.flatpickr_locale
  })

  var dateFrom = flatpickr('.datePickerFrom', {
    onChange: function(selectedDates) {
      dateTo.set('minDate', selectedDates[0])
    }
  })

  var dateTo = flatpickr('.datePickerTo', {
    onChange: function(selectedDates) {
      dateFrom.set('maxDate', selectedDates[0])
    }
  })

  flatpickr('.datepicker', {})
})

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_backend-4.3.3 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.2 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.1 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.0 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.0.rc3 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.0.rc2 app/assets/javascripts/spree/backend/global/flatpickr.es6
spree_backend-4.3.0.rc1 app/assets/javascripts/spree/backend/global/flatpickr.es6