Skip to content

Commit edc8333

Browse files
set the month field with the currenty month on page load
1 parent 2b26e3d commit edc8333

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/revenue_estimations/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="form-row">
3131
<div class="form-group col-6">
3232
<%= f.label :month, :class => 'control-label' %>
33-
<%= f.select :month, options_for_select((1..12).map { |m| [I18n.t("date.month_names")[m], m] }, f.object.date&.month), {}, class: 'form-control' %>
33+
<%= f.select :month, options_for_select((1..12).map { |m| [I18n.t("date.month_names")[m], m] }, Time.now.month), {}, class: 'form-control' %>
3434
</div>
3535

3636
<div class="form-group col-6">

0 commit comments

Comments
 (0)