Closed (fixed)
Project:
Event
Version:
5.x-1.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2007 at 15:54 UTC
Updated:
1 Apr 2008 at 20:37 UTC
Is there a way to change the granularity for the minute selection?
For instance, it would be nice to narrow the list down to 15 minute increments -- :00, :15, :30, :45.
Comments
Comment #1
Digivonity commentedThis is what I've done to solve the issue:
for ($i = 0; $i <= 59; $i++) $minutes[$i] = $i < 10 ? "0$i" : $i;for ($i = 0; $i <= 59; $i += 15) $minutes[$i] = $i < 10 ? "0$i" : $i;Of course this patch will last until your next update of the Event module. So it probably would be better if granularity can be changed trough the Event admin page.
Comment #2
killes@www.drop.org commentedYou can use hook_form_alter in your site specific module to change this.
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
xurizaemonHere's a simple example of what killes is suggesting - using hook_form_alter in your custom module to alter the form before presentation ... improvements welcome!
This approach avoids the tedious effort of having to patch the module on each update, or (worse) having to avoid updating modules because you don't have time to patch them today. It's much, much safer.
I would appreciate any critique on the code below.