Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date picker stops working with filters #4

Open
neworkflow opened this issue Oct 12, 2020 · 2 comments
Open

Date picker stops working with filters #4

neworkflow opened this issue Oct 12, 2020 · 2 comments

Comments

@neworkflow
Copy link

Hi,

thanks for the plugin, it's really helpful! :)

However I noticed an issue. I activated the plugin and it translates the calendar to German, that's fine. Additionally I wanted to change the date format into dd/mm/yyyy by adding the code to functions.php

// Example, change date format to dd/mm/yyyy
add_filter( 'elementor/datepicker/format', function(){ return 'd/m/Y'; } );

Unfortunately, when I do this, the date picker stops working correctly, I'm unable to select any dates after 20th September. Not sure why? I did a screencast about the issue: https://recordit.co/9jTn2XdC6j

Thanks
Pierre

@T1rnanog
Copy link

Hi just watched your screen cast, great!
I always use https://docs.oracle.com/cd/E41183_01/DR/Date_Format_Types.html

Im using the Elementor Hello child master theme.
Added this no date issues, hope it helps you to.

// Example, force 'nl' language
add_filter( 'elementor/datepicker/locale', function(){ return 'nl'; } );

// Example, change date format to dd/mm/yyyy
add_filter( 'elementor/datepicker/format', function(){ return 'd/m/yy'; } );

// Use 24h format on time input
add_filter( 'elementor/datepicker/24h', '__return_true' );

@neworkflow
Copy link
Author

neworkflow commented Oct 14, 2020

Hi,

thanks for your reply.

Unfortunately it still doesn't work for me: https://pasteboard.co/JvAt7vm.png

Once I apply the filter

// Example, change date format to dd/mm/yyyy
add_filter( 'elementor/datepicker/format', function(){ return 'd/m/yy'; } );

I'm not able to select any date further than September 2020.

I checked browser console and see that I get an error for "flatpickr": https://pasteboard.co/JvAuM7m.png
https://npmcdn.com/[email protected]/dist/l10n/de.js

Any ideas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants