Sha256: 9ff6a3f24b8d914e4ebf3af13b3ef8e11d660e342c6f8b92c2ff9b75e2a5d31b
Contents?: true
Size: 951 Bytes
Versions: 17
Compression:
Stored size: 951 Bytes
Contents
# http://eonasdan.github.io/bootstrap-datetimepicker/Options/ initialize = (target) -> $(target || document).find('input.effective_date_picker:not(.initialized)').each (i, element) -> element = $(element) options = element.data('input-js-options') || {} element.addClass('initialized').datetimepicker(options) element.trigger('dp.end_date_initialized') if (element.attr('name') || '').indexOf('[end_') != -1 $ -> initialize() $(document).on 'page:change', -> initialize() $(document).on 'turbolinks:load', -> initialize() $(document).on 'turbolinks:render', -> initialize() $(document).on 'cocoon:after-insert', -> initialize() $(document).on 'effective-form-inputs:initialize', (event) -> initialize(event.currentTarget) $(document).on 'turbolinks:before-cache', -> $('input.effective_date_picker.initialized').each (i, element) -> $input = $(element) $input.datetimepicker('destroy') if $input.data('datetimepicker')
Version data entries
17 entries across 17 versions & 1 rubygems