I can check after Wednesday. Currently not on a windows machine
Could you try a manual change at line 1102 scripts_es6.js
currentNode.dataset.class == 'wpcf7cf_group' ? 'group' :
to
currentNode.getAttribute("data-class") == 'wpcf7cf_group' ? 'group' :
You’ll probably need to translate this to the stranspiled scripts.js file as well:
So there you would need to find this line:
var type = currentNode.classList && currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' : currentNode.dataset["class"] == 'wpcf7cf_group' ? 'group' : currentNode.className == 'wpcf7cf_step' ? 'step' : currentNode.hasAttribute('name') ? 'input' : false;
and change it to
var type = currentNode.classList && currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' : currentNode.getAttribute("data-class") == 'wpcf7cf_group' ? 'group' : currentNode.className == 'wpcf7cf_step' ? 'step' : currentNode.hasAttribute('name') ? 'input' : false;
Sorry, but I can’t test this myself, because I don’t know the reason for the dataset object to be null sometimes. dataset should be fully supported by IE11 according to https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/dataset
Thread Starter
zberno
(@zberno)
Hi Jules,
thank you for the support.
I think I found the problem in the theme datepicker (ab-datepicker not the CF7 jqueryUI original one).
So I think the IE11 dataset object issue is related to a sort of DOM alteration by my datepicker.
Current status:
– CF7 conditional fields v1.9.14 (untouched original code);
– CF7 v5.2.2;
– Removed custom datepicker;
– Added CF7 fallback datepicker: add_filter( 'wpcf7_support_html5_fallback', '__return_true' ); in functions.php;
– Now IE11 does not show errors.
With this setup:
– Modern browsers show native datepicker (ok for mobile, not very good for desktops)
– Browsers with unsupported type=”date” input show jqueryUI datepicker but when date is picked the input shows the date in ISO format (yyyy-mm-dd) (very confusing for users but this is the only configuration for a correct CF7 form validation)
Thanks for all the support
-
This reply was modified 5 years, 7 months ago by
zberno. Reason: wrong snippet code
-
This reply was modified 5 years, 7 months ago by
zberno. Reason: clarification