changing the size of datetime_select field in rails

1.1k Views Asked by At

I tried to change the size of datetime_select using size and width and height but it seem not working they are so big while they just contain a number on them ?

<%= f.datetime_select :start_time, :order => [:day, :month, :year, :hour,:minute] , start_year: Time.now.year,:size => 5 %>

any soultion to this ?

thanks so much

1

There are 1 best solutions below

0
On

Try this:

<%= f.datetime_select :start_time, 
    { :order => [:day, :month, :year, :hour,:minute], :start_year => Time.now.year }, 
    :size => 5 %>