~iany/ Menu
  • Series
  • Tags
  1. Home
  2. Tags
  3. Form

Form

A collection of 1 article

Rails Compound Input

When I implement time input feature for 19wu (an open source ticket sale system), I want to split the datetime into date and time parts, so JavaScript date picker and time picker can be used. This post introduces two methods I found. Compound datetime input composed_of utilizes assign_multiparameter_attributes trick like datetime_select, and fields_for mocks an association. The github repository doitian/rails-compound-input-demo contains demos for both methods.

Updated Nov 19, 2025  •  3 min read

© 2026  •  ~iany/  •  CC-BY-SA 4.0