views:

39

answers:

1

As much as I love rails, I've always hated dealing with dates in an html form...especially when the date isn't an object's property.

The select_date helper is nice, but it always generates this:

<select name="date[year]" id="date_year">
<select name="date[month]" id="date_month">
<select name="date[day]" id="date_day">

And I can't figure out a way to change the name prefix from "date" to something else. Is there a way to do this? What do you all use for date inputs when they're not an object property?

A: 

if it's not an object property, are you just using the rails date helpers? You can probably do better.

I'd just have a simple textfield, and use jquery to decorate it as a date .. check out this jQuery date drop-down.

You'd then parse it in the controller as a Date and do whatever you need to. it'll just be params[:super_cool_date] (or whatever)

Jesse Wolgamott
I've considered that... Problem is I'm using a modal window (facebox) and it has issues getting along with the date picker I'm using.
tybro0103