This is the error i am facing:
Uncaught TypeError: Object [object Object] has no method 'datepicker' myquery.js:13
(anonymous function) myquery.js:13
fire jquery.js:3049
self.fireWith jquery.js:3161
jQuery.extend.ready jquery.js:434
completed
the code of myquery.js is below:
jQuery(function($){
$("#datepicker").datepicker({
dateFormat: 'yy-mm-dd'
});
});
In my application.js i have:
//= require jquery
//= require myquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
And in my application.html.erb i have this:
<%= stylesheet_link_tag "http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" %>
true %>
and lastly my index.html.erb says:
<label for="date">Date</label>
<input type="text" id="datepicker"></p>
i have tried almost all the answers on stackoverflow but no gain. plz tell me what to do...