TIL: date_select VS date_field
There are different ways to display time
, date
, date_time
fields in a rails app:
<%= form.time_select :published_at %>
<%= form.time_field :published_at %>
<%= form.date_select :published_at %>
<%= form.date_field :published_at %>
<%= form.datetime_select :published_at %>
<%= form.datetime_field :published_at %>
Safari view:
Firefox view:
I like the *_field
much more than *_select
variants in this case.
Did you like this article? Did it save you some time?