RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jimm810
Worked perfectly in my rails 3.2.2 application. Thank you!
Here's the simple_form code I used:
<%= f.input :schedule_date, :label => 'Date', :as => :string, :input_html =>{:class=>'datepicker'} %>
I changed the javascript: application.js $(function (){ $('.datepicker').datepicker(); });
application.js $(function (){ $('.datepicker').datepicker(); });
This allowed me to use datepicker on any field where I specified :class=>'datepicker'
If you're using rails 3.2, you'll need Tom Harrison's coffee script snippet (see below) to get around a date save problem.
Worked perfectly in my rails 3.2.2 application. Thank you!
Here's the simple_form code I used:
<%= f.input :schedule_date, :label => 'Date', :as => :string, :input_html =>{:class=>'datepicker'} %>
I changed the javascript:
application.js
$(function (){
$('.datepicker').datepicker();
});
This allowed me to use datepicker on any field where I specified :class=>'datepicker'
If you're using rails 3.2, you'll need Tom Harrison's coffee script snippet (see below) to get around a date save problem.