Datepicker is not working

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:

<%= f.label :expense_on %>
<%= f.text_field :expense_on, :id => "datepicker" %>

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.

I have solved this problem.

On 20 July 2014 05:43, Jaimin P. [email protected] wrote:

I have solved this problem.

Thanks for sharing the solution so that others can learn from it.

Colin

Thanks for sharing the solution so that others can learn from it.

Thank you for your suggestion. I have shared my solution.

Kind regards.

I have solved this problem.

I have changed application.html.erb file. I attached updated file of
application.html.erb, Please find it.

I have add code in quantities.js.coffee like as follow:

jQuery ->
$(’.datepicker’).datepicker()

Kind regards.