Events - error on time input

If you aren't speaking german, you can ask for support or post your request here.
Antworten
TenX
Beiträge: 54
Registriert: 11. Sep 2015, 13:22

Events - error on time input

Beitrag von TenX »

Under admin menu, Preferences > Regional Settings, I have the Time format set as 'g:i a'. which displays the time as "5:25 pm".
When I try and create a new event, and set the date and time (e.g. 10/20/2015 7:00 pm), and click Save, I get the following error:
Time error in field Time Start.
Format time value according to this: g:i a.
Any ideas what the issue may be?
Bullseye
Beiträge: 210
Registriert: 28. Apr 2015, 22:56

Re: Events - error on time input

Beitrag von Bullseye »

i think there is something going wrong. See screenshot or demo.
In date field is am until u click it.
2015-10-16 20_36_44-Demo-Organisation - Termine anlegen.png
2015-10-16 20_36_44-Demo-Organisation - Termine anlegen.png (6.47 KiB) 11756 mal betrachtet
When i want to create new event i got that

Code: Alles auswählen

arning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 88 in /www/htdocs/admlogin/demo/adm_program/system/classes/datetimeextended.php on line 263

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/admlogin/demo/adm_program/system/classes/datetimeextended.php:263) in /www/htdocs/admlogin/demo/adm_program/system/classes/message.php on line 154
Hinweis

Es wurde keine gültige Uhrzeit in das Feld Uhrzeit Beginn eingegeben.

Die Uhrzeit muss dem folgenden Format H:i entsprechen.
Benutzeravatar
Thomas-RCV
Former team member
Beiträge: 786
Registriert: 1. Aug 2011, 15:06

Re: Events - error on time input

Beitrag von Thomas-RCV »

Hi all

At this time we know there´s obviously a bug with date formats.
Could be the same problem like this issue:

https://github.com/Admidio/admidio/issues/84

Best,
Thomas
Benutzeravatar
fasse
Administrator
Beiträge: 6182
Registriert: 12. Nov 2005, 16:06

Re: Events - error on time input

Beitrag von fasse »

Bullseye hat geschrieben:i think there is something going wrong. See screenshot or demo.
In date field is am until u click it.
This was because you set g i:a in the date format field and not the time field.
Benutzeravatar
fasse
Administrator
Beiträge: 6182
Registriert: 12. Nov 2005, 16:06

Re: Events - error on time input

Beitrag von fasse »

I think this is another bug and not the same as mentioned. The existing bug has something to do with a wrong php locale setting. This bug seems to be something with time check.

I create a new issue https://github.com/Admidio/admidio/issues/191
Benutzeravatar
fasse
Administrator
Beiträge: 6182
Registriert: 12. Nov 2005, 16:06

Re: Events - error on time input

Beitrag von fasse »

Ok, it was the same bug :(

You can download the attached file and copy the unzipped file to adm_program/modules/dates.

Now we accept hopefully all possible formats within the event module.

Fasse
Dateianhänge
dates_function.php.zip
(5.23 KiB) 670-mal heruntergeladen
Bullseye
Beiträge: 210
Registriert: 28. Apr 2015, 22:56

Re: Events - error on time input

Beitrag von Bullseye »

fasse hat geschrieben:
Bullseye hat geschrieben:i think there is something going wrong. See screenshot or demo.
In date field is am until u click it.
This was because you set g i:a in the date format field and not the time field.
Ah ok. But if u do that, an error mesage should thrown, that u are using wrong format
TenX
Beiträge: 54
Registriert: 11. Sep 2015, 13:22

Re: Events - error on time input

Beitrag von TenX »

I updated the 'dates_function.php' file and am now able to create and save the events. Thank you! :D

There are still a few issues(inconveniences?) though, that can be addressed (would be nice :)):
  1. When you create a new event, the default Start and End dates show as 11/30/1999. It would be much more user friendly if it opened with the current date, so when when the field is clicked it opens with the current month pop-up calendar instead of November, 1999.
  2. If one edits an existing event, when the edit event form opens, it does not show the dates and time that the event is scheduled for, but reverts back to the date of 11/30/1999, and the time value of 12:00 a.m., for both the Start and End dates.
  3. When creating or editing an event, if one deletes the default time value displayed, the underlying format in the field shows as the format of the date and not the time. Shows mm/dd/yyyy instead of the correct time format.
Benutzeravatar
fasse
Administrator
Beiträge: 6182
Registriert: 12. Nov 2005, 16:06

Re: Events - error on time input

Beitrag von fasse »

All the problems belong to one line of code that I have changed now :)

Please replace the file of the attachement in adm_program/system/classes

Now your date and time formats should work in the event module.
Dateianhänge
htmlform.php.zip
(14.72 KiB) 510-mal heruntergeladen
TenX
Beiträge: 54
Registriert: 11. Sep 2015, 13:22

Re: Events - error on time input

Beitrag von TenX »

Awesome! Works great now! :D
Item #3 is still existing though, underlying format suggestion still shows mm/dd/yyyy in grey in the time field. Minor issue and does not affect the functionality of the form.
Thank you for the quick responses and fixes!
Antworten