Home Rails 4 - Bootstrap-datepicker - Uncaught TypeError: $(...).datepicker is not a function Reply: 0 # Rails 4 - Bootstrap-datepicker - Uncaught TypeError:$(...).datepicker is not a function

user1034
1#
user1034 Published in August 15, 2018, 11:17 am
 I installed the gem. gem 'bootstrap-datepicker-rails'  Added this line to application.css *= require bootstrap-datepicker3  Added this line to application.js //= require bootstrap-datepicker  And put this into my form: 
<%= f.label :start_date %>
<%= f.text_field :start_date, data:{ provide:'datepicker' } %>
 It works fine, however I would like to customize the date format, so I changed it to this: <%= f.text_field(:start_date, {:class => 'datepicker' }) %>  This doesn't work and gives me the following error: Uncaught TypeError: \$(...).datepicker is not a function
 You need to login account before you can post.
Processed in 0.292106 second(s) , Gzip On .