replace this:
<%= f.input :created_at, :as=> 'datepicker' ,:label => 'Date of send' %>
with:
<%= f.input :created_at, :as=> 'string' ,:label => 'Date of send', input_html: { class: 'datepicker' } %>
explanation:
f.input :created_at, :as=> 'datepicker'..
doesn't work because simple_form
gem doesn't know about input of type :datepicker
. And because the actual datepicker
js library is designed to work with input type="text"
you should just tell simple_form
to use this kind of input with as: 'string'
. Then the js library does it's part and transforms standart text input into a datepicker