Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect jQuery Datepicker to my Ruby on Rails form?

I'm trying to use the jQuery Datepicker to set a date field in my Ruby on Rails form, but I can't work out how to do it. Can someone point me in the right direction?

like image 594
ben Avatar asked Jul 25 '10 13:07

ben


People also ask

How datepicker is implemented in jQuery?

$(function() { $("input#date_due"). datepicker(); }); The selector you want is all elements with the tag name "input" and the id attribute set to "date_due".


1 Answers

I've built a gem to handle this:

https://github.com/albertopq/jquery_datepicker

Hope it helps somebody else.

like image 149
albertopq Avatar answered Oct 16 '22 04:10

albertopq