Sha256: 5c216409ed142784605e233ca5f2318a6e2094f4972a9b97cd52607a0d9cfa01

Contents?: true

Size: 608 Bytes

Versions: 2

Compression:

Stored size: 608 Bytes

Contents

#= require jquery.xdan.datetimepicker.full

@setupDateTimePicker = (container) ->
  defaults = {
    formatDate: 'y-m-d',
    format: 'Y-m-d H:i',
    allowBlank: true,
    defaultSelect: false,
    validateOnBlur: false
  }

  entries = $(container).find('input.date-time-picker')
  entries.each (index, entry) ->
    options = $(entry).data 'datepicker-options'
    $(entry).datetimepicker $.extend(defaults, options)

$(document).on 'ready turbolinks:load', ->
  setupDateTimePicker $('body')
  $(document).on 'has_many_add:after', '.has_many_container', (e, fieldset) ->
    setupDateTimePicker fieldset

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_admin_datetimepicker-0.5.0 app/assets/javascripts/active_admin_datetimepicker.js.coffee
active_admin_datetimepicker-0.4.0 app/assets/javascripts/active_admin_datetimepicker.js.coffee