Skip to content Skip to sidebar Skip to footer

Trying To Put The Bootstrap-datepicker In My Rails Project

http://www.eyecon.ro/bootstrap-datepicker/ I am trying to put the datepicker in my rails project. Here the date is not pop up. I follow the instruction use javascripts n all but it

Solution 1:

Add in application.js

//= require_self   

and add $('#dp5').datepicker() when dom loaded

$(function() {
   $('#dp5').datepicker()
});

Solution 2:

You are trying to call the datepicker on on a type HTML element when it should be called on a class or id. Try changing:

<inputclass="span2"type="dp5" readonly="" value="12-02-2012" size="16">

To:

<input class="span2"id="dp5"readonly="" value="12-02-2012" size="16">

And it should work.

Post a Comment for "Trying To Put The Bootstrap-datepicker In My Rails Project"