The default rails datetime form builder provides the following form elements as select boxes…
[YYYY] [MONTH] [DD] - [HH]:[MM]
… in 24 hour time.
I would like to present my users with:
[MON.] [DD] [YYYY] - [HH]:[MM] [AM/PM]
How do you do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
datetime_selecthelper has lots of different options. I never bothered to remember them all so I use this apidock page as a reference (datetime_select and date_select have similar options).In you case, you’ll need to set
:orderarray,:ampmto true, etc.Edit: ok, I actually bothered to write the option hash you’ll need: