jeudi 26 juillet 2018

setting default timestamp in simple_form_for rails

My simple_form_for has fields

<div><%= f.input :start_time %></div>
<div><%= f.input :end_time %></div>

start_time and end_time are my database columns in postgresql by default when i open the forms it takes the current time as default as select it on options. How to set the default time which is 02:14(current time for start & end time) in the screensort to 00:00

UI looks like this enter image description here

database column enter image description here

Aucun commentaire:

Enregistrer un commentaire