Reputation: 1596
I'm currently using rails3 with jquery-plugin
I've been successfully using datepicker in my application however, I've just added some js from railcast 240 for ajax search. In my application.js file, I have the following:
$(function() {
$("#orders th a, #orders .pagination a").live("click", function() {
$.getScript(this.href);
return false;
});
$("#orders_search input").keyup(function() {
$.get($("#orders_search").attr("action"), $("#orders_search").serialize(), null, "script");
return false;
});
$("#order_installationdate").datepicker({dateFormat: 'yy-mm-dd'});
$("#order_orderdate").datepicker({dateFormat: 'yy-mm-dd'});
$("#milestone_milestone_due").datepicker({dateFormat: 'yy-mm-dd'});
$("#milestone_milestone_completed").datepicker({dateFormat: 'yy-mm-dd'});
$("#task_dueddate").datepicker({dateFormat: 'yy-mm-dd'});
});
});
However there seems to be a conflict between the two. I can have either or but not both together.
Upvotes: 0
Views: 141
Reputation: 35298
There's a syntax error on the second-to-last line in your JS. There's a });
on a line by itself that doesn't appear to match anything.
Your indentation is a bit messed up, so it's not too easy to spot.
Upvotes: 2