ActionView::Helpers::FormHelper
datetime_field
API docs (Rails 8.1.4.1) ↗Alias: datetime_local_field
def datetime_field(object_name, method, options = {})
Description
Creates an <input> with type="datetime-local" for a model attribute.
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Interacting with the preview updates the form submission.
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params