Sha256: e1d5be407e29aeaf73cb603562f9e3c47e2bda25cc4522caf15510b7b06e9cbb
Contents?: true
Size: 795 Bytes
Versions: 6
Compression:
Stored size: 795 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', initializer);
Version data entries
6 entries across 6 versions & 2 rubygems