Sha256: 2f87e68b0bbebd01cbc1fd7dd0983638a0aefc33f2df0fe44317e9542f71885e

Contents?: true

Size: 706 Bytes

Versions: 10

Compression:

Stored size: 706 Bytes

Contents

//= require jquery.xdan.datetimepicker.full

$(function() {
  setupDateTimePicker(document);

  $(document).on('has_many_add:after', '.has_many_container', function(event, fieldset) {
    return setupDateTimePicker(fieldset);
  });

  function setupDateTimePicker(container) {
    var defaults, entries;
    defaults = {
      formatDate: 'y-m-d',
      format: 'Y-m-d H:i',
      allowBlank: true,
      defaultSelect: false,
      validateOnBlur: false
    };
    entries = $(container).find('input.date-time-picker');
    return entries.each(function(index, entry) {
      var options = $(entry).data('picker-options');
      return $(entry).datetimepicker($.extend(defaults, options));
    });
  }
});

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
activeadmin_addons-0.12.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.11.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.10.1 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.10.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.9.3 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.9.2 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.9.1 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.9.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.8.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js
activeadmin_addons-0.7.0 app/assets/javascripts/activeadmin_addons/date-time-picker.js