This project is archived and is in readonly mode.

#6151 open
Ches Martin

add form helpers for date and time HTML5 input types

Reported by Ches Martin | December 11th, 2010 @ 08:04 PM

To complement the existing helpers we have for HTML5 input types like email, url, telephone, number, range and search, this patch adds simple helpers with tests for all of the date/time input types:

date, month, week, time, datetime and datetime-local

By virtue of the usual helper support for passing HTML options, you may of course specify the new attributes that these inputs support:

<%= date_field :todo, :due_date, :min => Date.today.rfc3339 %>

Patch is also available on a branch on GitHub for the pull/merge convenience you dig the most :-)

References:

http://diveintohtml5.org/forms.html#type-date
http://www.whatwg.org/specs/web-apps/current-work/multipage/states-...

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages