I'm creating an app with Rails and want to use time_select to enter the time, but it was difficult to use in 1 minute increments by default, so I made it in 30 minute increments.
First of all, the current situation
= f.time_select :end, {}, class: 'content__main__box__field__select'
In this case, in addition to the display every minute, the current time is automatically entered in the select column.
= f.time_select :end, {:include_blank => true, :minute_step => 30}, class:'content__main__box__field__select'
Now you can only select 00 minutes and 30 minutes, and the current time is not automatically entered in the select column, it is completely blank.
I learned the importance of ** Guguru Power ** again! Lol Even if I searched, it didn't hit well and it took a long time ...
I study every day.
Recommended Posts