Hi @ljacob1
Thank you for the positive words on the plugin.
I couldn’t see the page because it’s password protected, but I think what you’re saying is correct, the date picker script would need to run again when the field is duplicated. Unfortunately this is outside of what the plugin alone is able to do, you would need some custom code to trigger that.
If it helps, you would simply need to run
dtp_init(); after the field is cloned.
Hope it helps and sorry for the limitations.
Greetings, Carlos
Thanks for your help on that, I think I can get that working
Sorry, forgot about the p/w whilst its in development!
Hi,
I really like your plugin.
I am having the same issue with the repeater fields.
How can I implement dtp_init() in functions.php after the field is cloned as you suggested?
The plugin I am using is https://wordpress.org/plugins/cf7-repeatable-fields/
I really hope you can help.
Thank you
Hi @troglos
Due to the setup I have to work with, I didn’t go through the functions.php
I wrote a JavaScript function on the page to iterate over the Dom elements in the class I wanted to add it to. The elements then call dtp_init() on click after a short delay
-
This reply was modified 5 years, 9 months ago by
ljacob1.
Hi ljacob1,
Thank you for the reply.
Would it be possible, when and if you have a chance, to share the js function you used? I am still looking around for a solution, with no luck.
That would be really appreciated.
Hi @troglos
I’ve put the JS on GitHub https://github.com/lpjacob/wpcf7-datepicker
Please note – it works for my purpose but can’t promise it will in your circumstances or will not hurt the page load time
Thank you so much ljacob1,
I just made a little correction with the final brackets and it works!
Very appreciated.
Thanks
@troglos
Good spot! Have corrected on Github