Graphity
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Datepicker] Issue with multiple datepicker instancesHi Fahad,
great. We tested it and it worked for our case.
Thank you again for your fast replies.
Yours
GraphityForum: Plugins
In reply to: [WP Datepicker] Issue with multiple datepicker instancesHi again,
I tried fixing it. I came up with the following solution.
Of course, I only tested it for my case:$("<?php echo $wpdp_selector; ?>").each(function(index, element) { element = $(element); if(element.data('default-val') !== "") { element.val(element.data('default-val')); } });You hereby have the permission to use this code in your plugin for free, but I take not responsibility about issues with this 🙂
Forum: Plugins
In reply to: [WP Datepicker] Issue with multiple datepicker instancesHi WordPress Mechanic,
thanks for you replies and your offer to make me admin.
I found a “solution” or “the problem”. Not sure, but it helps to comment out line 384 in file functions.php:
$("<?php echo $wpdp_selector; ?>").val($("<?php echo $wpdp_selector; ?>").data('default-val'));My guess is, jQuery sets that val to _all_ selected elements instead of _each_. I.e. the first default-val is set as val to all.
If you still need an example, email me at [email protected] to give me admin access to that wordpress so I can reproduce the issue.
Yours
RaulForum: Plugins
In reply to: [WP Datepicker] Issue with multiple datepicker instancesHm, could you please provide a barebone jsfiddle where I can add my form elements? I’m not sure where to load those CSS, JS etc. you use, from.
Forum: Plugins
In reply to: [WP Datepicker] Issue with multiple datepicker instancesPerhaps you could provide a “barebone” jsfiddle with our functions so I can try to reproduce the issue there?