Reputation: 1896
I have a model for Event that I would like to have a user set date.
Is :time
or :timestamp
more appropriate? And is date_select
the best form helper to use here? Or is there a nice gem for selecting from a calendar or something?
Upvotes: 2
Views: 729
Reputation: 6840
I'd recommend creating your migration with a field called start
(or whatever seems appropriate to you) with a type of :datetime
(see here).
From the view perspective, the 'vanilla' approach would be to use datetime_select
. Info here.
You can probably find a lot prettier views with an unobtrusive pop-up calendar in JavaScript. I don't have any particular recommendations in this area.
Upvotes: 1