• Resolved iamJayChong

    (@iamjaychong)


    I saw another closed thread (11 months ago) which is same with my situation:
    https://wordpress.org/support/topic/about-use-custom-date-format-of-datepicker/

    I scanned through the source code too and realized the filed “Use Custom Date Format” is either not function or malfunction. I tried multiple format as per php syntax and the result still the same.

    Hope developer can look into this issue immediately as this date format confusion cost me a lots of trouble as I trusted the field and it’s description.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @iamjaychong

    Could you please try editing the UM file?
    /wp-content/plugins/ultimate-member/includes/core/um-filters-fields.php

    Look for this line:
    add_filter( 'um_profile_field_filter_hook__date', 'um_profile_field_filter_hook__date', 99, 2 );

    Now, change priority number 99 to 9999.

    Let’s see if this resolves the issue so we can update it on our end.

    Regards,

    Thread Starter iamJayChong

    (@iamjaychong)

    Hi @champsupertramp !

    Thank you so much for the response.

    I just tried and unfortunately seems like not working. But just to double confirm whether what I’m doing is correct, allow me to share screenshots so that you can help to double check too:

    https://image.jagole.com/album/ultimate-member.rCX

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @iamjaychong

    Can you please try adding 2 more 9s?

    add_filter( 'um_profile_field_filter_hook__date', 'um_profile_field_filter_hook__date', 999999, 2 );

    Regards,

    Thread Starter iamJayChong

    (@iamjaychong)

    Hi @champsupertramp !

    I tried, still the same. Data at phpMyAdmin still “1986/12/31″. Expectation shall be 1986-12-31”.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @iamjaychong

    Could you please contact me via team@ultimatemember.com so I can take a closer look at this issue?

    Please include this topic URL in the email message.

    Regards,

    Thread Starter iamJayChong

    (@iamjaychong)

    Hi @champsupertramp !

    Thanks again for responding and trying to help!
    I sent you email with access information. Hope to hear from you soon! 🙂

    Plugin Contributor Champ Camba

    (@champsupertramp)

    This topic has been resolved.

    The date format option of the Date picker field only applies to the front-end Profile form. If you need to change the date format submitted via Register form, you can try this code snippet:

    add_action("um_registration_complete","um_050621_change_date_format", 1, 2 );
    function um_050621_change_date_format( $user_id, $args ){
        $date = get_user_meta( $user_id, "yith_birthday", true );
        update_user_meta( $user_id, "yith_birthday", date_i18n("Y-m-d", strtotime( $date ) ) );
    }

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Use custom Date format from DatePicker still not working’ is closed to new replies.