ruby on rails - Simple form as date not getting input -
i'm making contact form site using simple_form , mail_form.
here's code on views:
f.input :start_date, as: :date, start_year: date.today.year, order: [:month, :year], label: false
however, not getting input :start_date, when made :start_date required field, keep getting "can't blank" no matter put.
it works when remove as: :date, , start_date included in email sent mail_form.
rails date format 'yyyy-mm-dd'.
that being said, @acacia correct.
if sort of datepicker, in javascript, might want specify date-format like
format: 'yyyy-mm-dd'
so, if using jquery datepicker be:
$(function() { $( "#datepicker" ).datepicker({ format: "yyyy-mm-dd" }); });
Comments
Post a Comment