Support

Home Forums Event Espresso Premium Localisation of datepicker in EE4?

Localisation of datepicker in EE4?

Posted: September 6, 2015 at 1:20 am

Viewing 3 reply threads


emarienborg

September 6, 2015 at 1:20 am

Hi!

I’ve seen that this topic has been raised a couple of times before, but as far as I can see it has yet not been resolved.

Is there any way to change the time format in the datepicker from am/pm to 24 hour format? To native users of the 24 hour clock format, the am/pm system is really, really confusing.

Earlier topics regarding the same:
https://eventespresso.com/topic/ee4-date-picker-localisation/
https://eventespresso.com/topic/ee4-date-picker-localisation-2/

All the best,
Eivind


Josh

  • Support Staff

September 8, 2015 at 10:22 am

Hi Eivind,

You can change the time format in the datepicker to a 24 hour format by using the FHEE__espresso_events_Pricing_Hooks___set_hooks_properties__date_format_strings filter hook.

Here’s some example code that shows how it can be used:

function ee_new_dtt_formats( $formats ) {
	return array(
		'date' => 'Y-m-d',
		'time' => 'H:i'
		);
}
add_filter( 'FHEE__espresso_events_Pricing_Hooks___set_hooks_properties__date_format_strings', 'ee_new_dtt_formats' );

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


emarienborg

September 9, 2015 at 1:23 pm

Thanks, that worked great! 🙂


Josh

  • Support Staff

September 9, 2015 at 2:05 pm

You’re welcome.

Viewing 3 reply threads

The support post ‘Localisation of datepicker in EE4?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso