Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1418186

    I have this code in the child theme functions.php file and it is not changing the date format.

    add_filter(‘avf_datepicker_date_placeholder’, ‘new_date_placeholder’);
    function new_date_placeholder() {
    $placeholder = “DD.MM.YY”;
    return $placeholder;
    }

    add_filter(‘avf_datepicker_dateformat’, ‘new_date_format’);
    function new_date_format() {
    $date_format = ” dd.mm.yy”;
    return $date_format;
    }

    Can you help me so it is mm / dd / yyyy?

    #1418232

    Hey blizzmarketing,

    Thank you for the inquiry.

    Did you adjust the $placeholder and $date_format values in the filter? Please try to use the following code.

    add_filter('avf_datepicker_dateformat', 'new_date_format');
    function new_date_format() {
        $date_format = "mm / dd / yy";
        return $date_format;
    }
    
    add_filter('avf_datepicker_date_placeholder', 'new_date_placeholder');
    function new_date_placeholder() {
        $placeholder = "MM / DD / YY";
        return $placeholder;
    }

    Best regards,
    Ismael

    #1418292

    That worked, thanks!

    #1418325

    Hi,

    Great! Good to know that the solution worked. Please do not hesitate to open another thread if you have more inquiries about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Datepicker Format Not Changing’ is closed to new replies.