mowsen-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2009-Jun-06 09:42 UTC
select_time / select current time + 15 min
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
mowsen-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2009-Jun-06 14:45 UTC
Re: select_time / select current time + 15 min
*hrmpf*. once again, forget about it... http://groups.google.com/group/activescaffold/browse_thread/thread/6482c8b96c423290 sometimes i should turn on my brain ;) m On Jun 6, 11:42 am, "mow...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <mow...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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