We are using Deupal 6.10 and the latest Events release. When creating or editing an event the section to input start or end date and time is displayed in a very confusing format:

[day][minute][hour][month][year]

We haven't found a way yet to modify that and need some help as our authors are having troubnle entering proper dates. The fields are not labeled either, si it's always trial and error to input the correct date and time.

Comments

frank ralf’s picture

StatusFileSize
new9.77 KB

I can confirm this bug with Drupal 6.10, Event 6.x-2.x-dev (2009-Mar-16), see screenshot. The theme is out of the box Garland .

Frank

killes@www.drop.org’s picture

event.module uses date_format_short for formatting the select box.

on admin/settings/date-time, which option did you chose for "short time format"?

If I use "28.06.2009 18:44" then I get the boxes in this order.

killes@www.drop.org’s picture

Status: Active » Postponed (maintainer needs more info)

changing status

jurgenhaas’s picture

Thanks for your response.

I had "2009-06-29 7:45" as the date-time-format which resulted in the reported field sequence.

Now I changed it to "29.06.2009 7:45" and the fields in the event edit are in the same and expected order as the date-time-format.

Thanks, for me the issue is solved but it feels as if in general this is not quite solved for every format.

killes@www.drop.org’s picture

I have now set my short date format to what you describe and it works as expected for me.

Not sure what to do about this.

frank ralf’s picture

StatusFileSize
new36.54 KB
new15.36 KB

I use the user defined date format "d.m.Y" and the input fields get still mangled (see screenshots, the date is 1 July 2009, 19:30 h). Pre-defined formats seem to work, though.

jurgenhaas’s picture

Yes, I can confirm that it must have to do with custom date formats. All others I've tried seem to work correctly.

And I get the same wrong event_input_fields as displayed in #6 attachment #1 when using custom date format.

killes@www.drop.org’s picture

Status: Postponed (maintainer needs more info) » Active

I think the problem is that you did not specify hour and minutes in your format. THis confuses my "algorithm". I will try to fix this.

frank ralf’s picture

Thanks!

killes@www.drop.org’s picture

After thinking about this a bit: Does that mean you never use the hour:minute fields in the event form? If yes, I could just omit them.

frank ralf’s picture

No, not at all! I certainly need hour/minutes settings for events. I only set the short date format to not using them because Drupal also uses the short date format for the publishing date of nodes. _There_ I don't want hours/minutes.

So it comes down to the short date format being used as default format at different places in a Drupal installation. Preferably the Event module wouldn't rely on such a site wide setting.

Thanks for your efforts!
Frank

killes@www.drop.org’s picture

Status: Active » Needs review
StatusFileSize
new2.23 KB

Here is a patch that would not show the hour and minute fields if they are not in the format.

The time will be saved as 12:00 in the database.

Please try it.

killes@www.drop.org’s picture

ah, darn, I hadn't read your answer before rolling this nice patch. :p

I am not sure about not using a site-wide setting. In my opinion, dates and times (or other similar things like usernames) should be displayed in the same way everywhere on a site. Hence my attempt to use this format to determine the order of the input boxes.

However, see the issue at #395952: Date display on event node page where I will allow users to chose which time format to chose.

killes@www.drop.org’s picture

Actually, I've reconsidered what I wrote above. I guess it is the cleanest solution to introduce an event specific input format _and_ apply this patch.

nzcodarnoc’s picture

Subscribing

Matt Hampel’s picture

Has this issue been addressed? I am having this exact problem with the current posted version of Event for 6 (6.x-2.x-dev).

achton’s picture

Subscribing.

nicolasg’s picture

StatusFileSize
new24.24 KB

What I did to solve the usability was to add the text field data type as the title of the field.

event.module

 $element[$type] = array(
      '#type' => $form_type,
      '#default_value' => $element['#value'][$type],
      '#attributes' => $element['#attributes'],
    	'#title' => $type	//FIX so that  you know what field is what.
    );
frank ralf’s picture

Labels for date input fields

That's a nice workaround. Thanks!

japerry’s picture

Status: Needs review » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.