Events – 24h time format and recurring (custom) calendar format
This topic contains 12 replies, has 4 voices, and was last updated by amweb 5 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 16, 2019 at 8:53 am #503338
Dear GD support team,
I have two questions concerning the add listing page for events:
- How can I change the time format in events from AM/PM to 24h (as already set in the WordPress settings)? I did not find any detailed info and am actually using the following snippet from V1 (which seems to work, but I would like to avoid eventual “hidden” issues):
function gde_24hour_times( $times ) { foreach($times as $key=>$val){ $times[$key]=$key; } return $times; } add_filter( 'geodir_event_schedule_times', 'gde_24hour_times' );
- When trying to create a recurring event with the “Custom” recurrence, the calendar uses a different format than the one set in the WordPress settings (which BTW gets correctly applied on the event start/end dates):
- The first day of the week is Sunday (instead of Monday)
- The months are displayed in EN (instead of IT)
- The days are displayed in EN (instead of IT)
- The design/layout is different
Thank you in advance for your support.
August 16, 2019 at 3:56 pm #503371Hi,
a developer has been alerted about this.
They’ll reply as soon as possible, but at this point I think it’ll be after the week end.
Thanks for your patience
August 19, 2019 at 11:09 am #5036601) Try following HP snippet to show hours in WordPress time format in add/edit event form.
function gd_snippet_event_schedule_times( $times ) { $_times = array(); foreach ( $times as $value => $label ) { $_times[ $value ] = date_i18n( get_option( 'time_format' ) , strtotime( $value ) ); } return $_times; } add_filter( 'geodir_event_schedule_times', 'gd_snippet_event_schedule_times', 20, 1 );
—
2)
Have you translated GeoDirectory core & Event Manager plugin?Please provide admin credentials to look inot more.
Kiran
August 19, 2019 at 1:05 pm #503678Hi Kiran,
Thank you for your feedback.
1) I used your PHP snippet and it seems to work properly, thank you.
2) Yes, I have translated GD core and Event Manager plugin in WPML, at least the strings that I found until now (I also did a test by translating all remaining strings for “August” to see if it would get translated in the calendar but it still doesn’t change anything). The calendars for “Start date” and “End date” appear correctly (see first two screenshots), the issue is that the appearance, first day of week and language for the calendar under “Recurring event” >> “Repeats = Custom” differ completely (see third screenshot), as if they were created with a completely different component (as also proven by the different classes in the resulting frontend code). In addition it seems that this calendar is not localized (see test described above for the string “August”, but nothing has changed in the frontend).
NB: I will send you admin credentials in the next (private) reply.
Kind regards,
AronAugust 19, 2019 at 1:11 pm #503682This reply has been marked as private.August 19, 2019 at 1:40 pm #503689Hi Aron,
This has been fixed and it will be in next release.
Provide us FTP credentials if you to apply patch from our side to fix it now.
Thanks,
KiranAugust 20, 2019 at 1:02 pm #503934This reply has been marked as private.August 23, 2019 at 1:12 pm #504569Hi, are there any news about the patch?
Unfortunately I still see the wrong calendar format for the “custom” recurring events.
August 23, 2019 at 2:21 pm #504578Please try now after clearing your browser cache.
Kiran
August 23, 2019 at 2:33 pm #504580Hi Kiran,
Thanks for the update.
We are almost there: I now correctly see the calendar months and days in italian, but the first day of the week is still Sunday instead of Monday.
Can you please have another look?
Thank you very much and kind regards
August 23, 2019 at 4:58 pm #504616This reply has been marked as private.August 26, 2019 at 10:23 am #504908Hi,
Please check now. In event calendar week start day can be managed from widget/shortcode settings.
Kiran
August 26, 2019 at 1:27 pm #504921Hi Kiran,
Perfect, now it works exactly as expected!
Thank you very much for your support (and thanks also for the tip about the event calendar widget/shortcode).Kind regards,
Aron - How can I change the time format in events from AM/PM to 24h (as already set in the WordPress settings)? I did not find any detailed info and am actually using the following snippet from V1 (which seems to work, but I would like to avoid eventual “hidden” issues):
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket