Date field for UK format and all browsers
-
Contact form 7 is good apart from lack of support for UK dates.
I have read numerous forum posts about this, and it appears that the HTML5 code only works as expected in Google Chrome, but not in IE.The stated fallback is to use the international format yyyy-mm-dd, but that is of little use in the UK for most website visitors who care nothing about standards, they just want a website that they understand and can use. This point has already been made in one post.
There also seems to be an entrenched techy view thats its tough if IE doesn’t yet support HTML5 for the CF7 date fields, however again getting back to non-techy basics, the majority of web users still use IE in one of its versions so like it or not, software still needs to cater for this.
Many of us posting to this form need to have a date field that accepts dates in the UK format: dd-mm-yyyy, and preferably with a date picker that works in all modern browsers ie Chrome, FFox, Safari, IE9,10,11.
I have tried the following:
Specifying the date format. This allows it to work in IE, but not with a UK format
[date* StartDate “yyyy-mm-dd”]. Using [date* StartDate “dd-mm-yyyy”] results in “Date format seems invalid” message with form is submitted.Adding the following fallback to the functions.php, but this still does not allow the use of the UK date format but it does provide a date picker in IE11.
add_filter( ‘wpcf7_support_html5_fallback’, ‘__return_true’ );
This has a massive downside in that if the theme is updates this change is lost, and I dont want to use a child theme, so not really a valid solution.Installing the plugin “Contact Form 7 IE DatePicker and Number Spinner Fix”. This appears to give the same result as the edit to the functions.php file above. Whatever date is selected, the date field is completed in the format yyyy-mm-dd, not the UK format, and if a user manually entered the date as dd-mm-yyyy it fails validation, even if the format is specified as in the first point above.
when playing with all the above, Chrome works fine with the UK format specified in the field tag, IE11 in W7 not.
Is there any other fix available?
PLEASE will the developers of CF7 do something about this, or at least provide an acceptable workround in the meantime.
Lencw
- The topic ‘Date field for UK format and all browsers’ is closed to new replies.