• 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

    https://wordpress.org/plugins/contact-form-7/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter lencw

    (@lencw)

    I have also tried the “Contact Form 7 Datepicker” plugin.
    This works on IE11, Chrome and FF, but the plugin selectable display theme does not work. This can be sorted, but with a lot of manual messing about with css. Also as it is a text field, the browser tried to autofill with text before the popup appears, this happen with all browsers and a test on a mobile device.
    For now this plugin is probably the better workround.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter lencw

    (@lencw)

    Thanks, but these are not answering the question.

    Using add_filter( ‘wpcf7_support_html5’, ‘__return_false’ );
    creates a text field which does not accept the UK date format dd-mm-yyyy, even if set in the contact form as [date* StartDate “dd-mm-yyyy”]. The form returns “Date format seems invalid”, which in itself is not helpful in that it does not provide in the error message the format expected.

    The fallback, as I said above, in IE ignored the UK date format set in the form. If a user enters a UK format date, the “Date format seems invalid” appears in IE.

    The second link talks about the date format only as the HTML5 format: yyyy-mm-dd, not the UK format we are after.

    The solution I need for UK based websites is a date field that accepts the UK date format, working in all browsers (HTML5 or not), and preferably with a date picker.

    Can this be sorted please within CF7? As a start it would help if the fallback at least honoured the UK date format in the form, and we had a setting to activate the fallback instead of editing the functions.php file.

    I am willing to make a donation as I have this installed on a number of websites, but without proper UK functional support and support for IE and lack of acknowledgement to this and other posts I am somewhat concerned.

    Thread Starter lencw

    (@lencw)

    Takayuki Miyoshi, Have you any further suggestions given my comments above please?
    I really need to to work in IE for the UK as well as Chrome, is there a proper solution on the way?
    Thanks

    Absolutely agree! Same problem here with Dutch value dd-mm-yyyy.
    @takayuki Miyoshi: Please advice, this post is 1 month old, thankyou!

    Can you please let us know this post is read? Questions no more than 1 hour old are resolved, but this question seems to be ignored….

    Thread Starter lencw

    (@lencw)

    Is there any proper resolution to this issue please?
    PLEASE will someone read the above and then review all other related support posts on the same subject as this is an important and unresolved issue.
    It really prevents UK users from using the full capabilities of Contact Form 7 with any date fields.

    I’m still looking for an answer as well

    Thread Starter lencw

    (@lencw)

    The Contact Form 7 Datepicker is now OK on a number of websites I have used it with setup for UK dates. Tested and working on PC with W7, with Ie, Safri, FF, Chrome, WXP IE8, Samsung tablet and phone.
    The date field is set up as:
    [date* start-date class:datefield date-format:dd/mm/yy “dd/mm/yy”]
    I don’t have a Mac, so not tested on that platform, but emulator suggests its OK.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Date field for UK format and all browsers’ is closed to new replies.