I am using Ruby 1.9.3 and Rails 3.2.16.
I want to add the datepicker widget to one of my select fields. I have
included 'jquery_datepicker', 'jquery-rails', 'jquery-ui-rails' in
Gemfile.
I am new for JQuery.
The form code like as follow:
<div class="field">
<%= f.label :expense_on %><br />
<%= f.text_field :expense_on, :id => "datepicker" %>
</div>
Code for application.js :
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require bootstrap
//= require_tree .
$(function() {
$('#datepicker').datepicker({dateFormat: 'yy-mm-dd'});
});
code for application.css:
/*
*= require_self
*= require jquery-ui
*= require_tree .
*/
I am not getting any error.
I attached application.html.erb. Please find it.
How could i fix this problem?
Kind regards.
Attachments:
http://www.ruby-forum.com/attachment/9916/application.html.erb