creame / elementor-datepicker-localization

Load current site locale for Elementor form datepicker
32 stars 5 forks source link

Elementor Datepicker Localization

Load current site locale for Elementor form datepicker.

Installation

Composer:

Recommended method, Roots Bedrock and WP-CLI

$ composer require creame/elementor-datepicker-localization
$ wp plugin activate elementor-datepicker-localization

Manual:

WP-CLI:

$ wp plugin install https://github.com/creame/elementor-datepicker-localization/archive/master.zip --activate

Requirements:

Usage

Install, activate and ready!

Filters

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' );

Support

Changelog

1.3.0 - 14 Auguts 2020

1.2.0 - 26 November 2019

1.1.0 - 26 November 2019

1.0.0 - 20 November 2019