Wee Date Picker Rails Plugin

July 18, 2008

After a bit of a sabbatical here is another plugin for you to feast on.

This is a super simple datepicker for your rails apps. It is essentially just a packaged version of DatePicker v2.9 by frequency-decoder.com with rails helpers for easy integration.

Install

If you install the plugin using git the installer should run and the files will be copied across recursively to your public directory.

Example

In the head section of the layout.

<%= yield :date_includes %>

In the template.

<%= load_date_picker %>

Then for each date field you need to do the following. Remember: field_names have to be unique on your page.
<%= date_picker :start_date, Date.today %>

Where the first argument is the field_name and the second is the initial value. This must be a date object.

This is a tiny plugin which needs a bit of work but hopefully it helps. It is available on the github project page

Update: I wrote the installer script myself.