I have a date_select field created with the following code:
<%= date_select f, :date_of_birth, builder: fn b -> %>
Day and Month of Birth: <%= b.(:day, ) %> / <%= b.(:month, ) %> / <%= b.(:year, [options: 1950..1998]) %>
<% end %>
<%= error_tag f, :date_of_birth %>
Now the individual day, month and year fields are vertically stacked on top of each other and each takes the whole row. What I need is to have them horizontally next with each other with the forward slash seperator between them. I’m using Bootstrap for the css side of things.
Just set the css in your css file for those elements to be
display: inline-block; or something like that.
How do I get the current day on this div?
The div does not hold information, rather the select’s that the datetime_select creates do, query them, they have an id too for easy querying as you can see at those docs, based on the name you give it.
I was looking for something like that.
<%= label f, :data, class: "control-label" %>
<%= date_select f, :data, builder: fn b -> %>
<%= b.(:day, [date.day]) %> / <%= b.(:month, [date.month]) %> / <%= b.(:year, [options: 2017..2020]) %>
<% end %>
<%= error_tag f, :data %>
In “controller” >
def create <
“Date = Date.utc_today ()”
But I’m not getting