This date field:
<%= f.text_field :my_date, id: 'id-123', type: 'date' %>
doesn't get bound to the value of my_date
of the model on the, for example, edit page. When I load the page, it's always "empty".
Why is that? I also tried:
<%= f.text_field :my_date, id: 'id-123', type: 'date', value: '11/11/11' %>
<%= f.text_field :my_date, id: 'id-123', type: 'date', value: '11-11-11' %>
and it also didn't work.
Aucun commentaire:
Enregistrer un commentaire