| Module | DateHelper |
| In: |
app/helpers/date_helper.rb
|
Distributed with Rails Date Kit www.methods.co.nz/rails_date_kit/rails_date_kit.html
Author: Stuart Rackham <srackham@methods.co.nz> License: This source code is released under the MIT license.
Rails text_field helper plus drop-down calendar control for date input. Same options as text_field plus optional :format option which accepts same date display format specifiers as calendar_open() (%d, %e, %m, %b, %B, %y, %Y). If the :format option is not set the the global Rails :default date format is used or failing that ’%d %b %Y’.
Explicitly pass it the date value to ensure it is formatted with desired format. Example:
<%= date_field(‘person’, ‘birthday’, :value => @person.birthday) %>