RailsCasts Pro episodes are now free!

Learn more or hide this

jimm810's Profile

GitHub User: jimm810

Comments by

Avatar

Worked perfectly in my rails 3.2.2 application. Thank you!

Avatar

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.