Is there a way to use some degradable javascript wizardry to change the values of the event end date/time based upon the values that the user has selected for the event start?
For example, when I'm creating events far into the future, I'd like the event end form values to automatically set themselves based upon what I've just entered in the event start fields. Not sure on the logic, but it would make sense to set the end time equal to the start time (or +1 hour) as a default.
OR......
What about a javascript function that would require user action to set the event end time? The user would select the start time, and then choose from one of several default event durations to automatically set the event end form values.
MOCKUP:
-----------------------------------
| Start time form fields |
-----------------------------------
Set event duration: 1 hour 2 hours 3 hours ... (links to javascript calls)
-----------------------------------
| End time form fields |
-----------------------------------
Comments
Comment #1
Owen Barton CreditAttribution: Owen Barton commentedIf you want to use javascript to do this it's pretty easy. Add the following code:
To event.js (or your theme)
You can then add buttons under the 'End' controls (event_nodeapi) in event.module:
You could also do this in your theme if you prefer.
To add an event duration on theming on an event please see:
http://drupal.org/node/4072
If event.module maintainers are interested in a patch for this let me know.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThis version of event.module is no longer supported. Please update your site. If the issue is still valid, don't hesitate to re-open it against a more recent version.