Sha256: 503e9f2c1e54c3a94f30aa69a2b4e88d255372e1312d4c35c4f99c64d9977683

Contents?: true

Size: 564 Bytes

Versions: 2

Compression:

Stored size: 564 Bytes

Contents

#= require jquery.xdan.datetimepicker

@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)

$ ->
  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.1.1 app/assets/javascripts/active_admin_datetimepicker.js.coffee
active_admin_datetimepicker-0.1.0 app/assets/javascripts/active_admin_datetimepicker.js.coffee