Sha256: 82580adcdad268e63bd014dcb2c176ed67f960615b0069ec1d5d6ecc96ad774e
Contents?: true
Size: 732 Bytes
Versions: 2
Compression:
Stored size: 732 Bytes
Contents
//= require vendor/jquery.datetimepicker.full function setupDateTimePicker(container) { const defaults = { formatDate: 'y-m-d', format: 'Y-m-d H:i', allowBlank: true, defaultSelect: false, validateOnBlur: false } $(container).find('input.date-time-picker').each(function(index, entry) { $(entry).datetimepicker($.extend(defaults, $(entry).data('datepicker-options'))); }); } function initXdanDateTimePickerPlugin() { setupDateTimePicker($('body')); $(document).on('has_many_add:after', '.has_many_container', function(e, fieldset) { setupDateTimePicker(fieldset); }); } $(document).ready(initXdanDateTimePickerPlugin); $(document).on('turbolinks:load', initXdanDateTimePickerPlugin());
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_admin_datetimepicker-1.1.0 | app/assets/javascripts/active_admin_datetimepicker.js |
active_admin_datetimepicker-1.0.0 | app/assets/javascripts/active_admin_datetimepicker.js |