• Resolved makai93

    (@makai93)


    First thank you for this great plugin!

    Now, I have a little problem because I need a custom field – type date.
    In form, for avoid typing errors, I change type=”date” with jQuery code => that’s ok.
    But it seems that the default date formatting is “m/d/Y” and I need “d/m/Y”?: when I enter in field input “13/12/2016” => error message “Please enter a valid date.”
    Could you please tell me where I can change the global setting format date??
    Or perhaps there is a better way to use “d/m/Y” for date formatting in form ?
    Another thing, (I’m not an expert developper) I don’t understand why the message “Please enter a valid date.” is in english while the translation exist in js/validate/localization/messages_fr.js
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    I will fix the message bug in the next day or two. Meanwhile, since you’re comfortable with code, if you want to hack the plugin, change line 68 in /strong-testimonials/includes/scripts.php to
    if ( file_exists( WPMTST_PUBLIC . $lang_file ) ) {

    There is no global setting for that. The default date format in Javascript varies across browsers and locales so the validator needs a date handler which the plugin does not do yet. It will have to wait until I add more field types and can do it properly.

    As a workaround, I know some other users accept dates as simple text and correct them as necessary.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    The localization file bug is fixed in version 2.16.3.

    Thread Starter makai93

    (@makai93)

    Thank you very much Chris !

    For my field date. The advantage with HTML5 and type=”date” is that the responsive interface, in a mobile is friendly user ;o)
    I will define my field as simple text, as you said me, and I will verify the enter or implement and datapicker ;o)
    There are several solutions…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom field – type date’ is closed to new replies.