I have a date_select in my Rails form:
<%= date_select(:production_month, :date, order: [:month, :year], :start_year => @start_year, :end_year => @end_year) %>
I have a JavaScript function that gets called when the value in the above date_select changes:
$('#production_month').change(function () {alert("Yayyy!!!")});
Can I read the value of the date_select inside an erb code which is inturn inside the JavaScript function above?
date_select. And I cannot use JavaScript variables inside my rails query. Is there a way to read thedate_selectvalues using Ruby syntax?