Sha256: 16309bb4060b0922925a57bc6ffe9f3b52099ef938f242f00a6c1951d1fb3f37
Contents?: true
Size: 1002 Bytes
Versions: 10
Compression:
Stored size: 1002 Bytes
Contents
# http://eonasdan.github.io/bootstrap-datetimepicker/Options/ initialize = (target) -> $(target || document).find('input.effective_time_picker:not(.initialized)').each (i, element) -> element = $(element) options = element.data('input-js-options') || {} element.addClass('initialized').datetimepicker(options) name = element.attr('name') || '' if name.indexOf('end_') != -1 || name.indexOf('_end') != -1 element.trigger('dp.end_date_initialized') $ -> 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_time_picker.initialized').each (i, element) -> $input = $(element) $input.datetimepicker('destroy') if $input.data('datetimepicker')
Version data entries
10 entries across 10 versions & 1 rubygems