Sha256: b31c43d45b7be4f791495d73f040d095f969bcd92202134b48d4f24be0084069
Contents?: true
Size: 806 Bytes
Versions: 7
Compression:
Stored size: 806 Bytes
Contents
var initializer = function() { setupDateTimePicker(document); $(document).on('has_many_add:after', '.has_many_container', function(event, fieldset) { return setupDateTimePicker(fieldset); }); function setupDateTimePicker(container) { var defaults = { formatDate: 'y-m-d', format: 'Y-m-d H:i', allowBlank: true, defaultSelect: false, validateOnBlur: false, scrollInput: false, }; var entries = $(container).find('input.date-time-picker-input'); return entries.each(function(index, entry) { var options = $(entry).data('picker-options'); var mixedOptions = $.extend(defaults, options); return $(entry).datetimepicker(mixedOptions); }); } }; $(initializer); $(document).on('turbolinks:load turbo:load', initializer);
Version data entries
7 entries across 7 versions & 1 rubygems