Skip to content

superdioz/elementor-datepicker-localization

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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:

  • Download the zip file
  • Unzip to your sites plugin folder
  • Activate via WordPress

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.1.0 - 26 November 2019

  • Added 'elementor/datepicker/24h' filter
  • Fix date field pattern throws form validation error if change default date format

1.0.0 - 20 November 2019

  • Initial release

About

Load current site locale for Elementor form datepicker

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%