Load current site locale for Elementor form datepicker.
Recommended method, Roots Bedrock and WP-CLI
$ composer require creame/elementor-datepicker-localization
$ wp plugin activate elementor-datepicker-localization
$ wp plugin install https://github.com/creame/elementor-datepicker-localization/archive/master.zip --activate
Install, activate and ready!
You can change localization language with 'elementor/datepicker/locale'
, change date format with 'elementor/datepicker/format'
and change time picker to 24h format with 'elementor/datepicker/24h'
.
Place on your themes functions.php file.
// Example, force 'es' language
add_filter( 'elementor/datepicker/locale', function(){ return 'es'; } );
// Example, change date format to dd/mm/yyyy
add_filter( 'elementor/datepicker/format', function(){ return 'd/m/Y'; } );
// Use 24h format on time input
add_filter( 'elementor/datepicker/24h', '__return_true' );