# Select\_time / select current time + 15 min

**URL:** <https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656>\
**Category:** Rails\
**Created:** [June 6, 2009, 11:42am UTC](https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656 "2009-06-06T11:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 6, 2009, 11:42am UTC](https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656/1 "2009-06-06T11:42:40Z")

</div>

hej there

i call select\_time in my view as follows:

\<%= select\_time(Time.now, { :default =\> Time.now, :minute\_step =\>  
15, :time\_separator =\> ‘:’, :include\_seconds =\> false } %\>

now i want the dropdown boxes to be set default to the current time +  
rounded up to the next 15 min. so if we’ve 11:38, they should show  
11:45.

it already shows the 11 in the hourbox but the minutes remain 00.

another problem seems to be that the browser remembers my selections  
in the dropdown boxes. so on reload, the page shows the time i  
previously selected instead of the current time. how can i solve that?

thanks alot for your help!  
moka

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 6, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656/2 "2009-06-06T16:47:25Z")

</div>

_hrmpf_. once again, forget about it…

[http://groups.google.com/group/activescaffold/browse\_thread/thread/6482c8b96c423290](http://groups.google.com/group/activescaffold/browse_thread/thread/6482c8b96c423290)

sometimes i should turn on my brain 😉

m

On Jun 6, 11:42 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
