at the moment, you need to make some change in the javascript file.
Hello.
Could you confirm that I have to change only the file events-manager\includes\js\events-manager.js ?
Moreover, could you tell me which function should I change? I spend more than 4 hours this week end and I don’t find how to do it. : (
Thanks in advance.
Best regards.
Gwen
I wouldn’t change that file, you’d want to add a new file using WP methods and ad your JS there so it’s not overwritten on your updates
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
You could try overriding the events template templates/forms/event/when.php
http://wp-events-plugin.com/documentation/using-template-files/
Hello,
Ok I added my custom js file. It’s working
I tried to had the following javascript code but It doesn’t work.
document.getElementById(‘gtr_start_date’).onchange=function(){
var t1 = document.getElementById(‘gtr_start_date’).value;
document.getElementById(‘gtr_end1_date’).value = t1;
};
With “gtr_start_date” and “gtr_end_date” the id of the date texts field.
I don’t find which javascript event used corresponding to the start_date selection.
Could you help me, please?
Best regards,
Gwen
have you tried @marcus suggestion; using ‘templates/forms/event/when.php’ template file instead? you can create your own javascript here.
Yes, I overload the file ‘templates/forms/event/when.php’ to give specific ID et name to the 2 fields.
Then I added my javascript code in my theme js file.
My problem now is to find which javascript event used to fill automatically the end_date field.
Any idea, please?
Best regards,
Gwen
you’d use something like jQuery(…).change(…)
or locate the element using jquery selectors and use the datpicker methods e.g. dateInput.datepicker(‘option’,’onSelect’,…
http://api.jqueryui.com/datepicker/