I collect month and year from user for a particular field called start
Year is mandatory where as month is optional.
Initially i used date_select for the field, but moved away when i learnt
that in date_select if user doesnt choose the month, month is set to Jan
So i thought of using, separate fields for month and year of type
integer. Tried using select_date and select_year, but could not set
default to blank in those methods.
So moved to plain html listing for select: Shown for date below
select id=“magazine_start_date_month” name=“magazine[start_date_month]”>January February March April May June July August September October November December and similarly for year too.
But when i tied to edit this, the fields are not getting populated but
value is stored correctly in db.
I knw i have done many foolish/naive things to get here, but i have
found no other way.