Skip to content

Commit c17e12b

Browse files
author
Anton Khamets
authored
Make the gem compatible with turbolinks
1 parent c40a76b commit c17e12b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/assets/javascripts/active_admin_datetimepicker.js.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
options = $(entry).data 'datepicker-options'
1515
$(entry).datetimepicker $.extend(defaults, options)
1616

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

0 commit comments

Comments
 (0)