Support

Account

Home Forums Front-end Issues Date picker help

Helping

Date picker help

  • Hello, I have been trying to find a solution for this but haven’t had any luck so far.

    I am using a date picker and I wish to display MMyy (April 2015 for example). I have the month and year appearing but I can’t seem to get there to be a character space between the month and year. I’ve tried simply entering a character space as well as the HTML value   but can’t seem to get it to work.

    Has anyone encountered this before?

  • Hi @dsgnr

    Try something like this:

    <?php
    $date = get_field('YOUR_ACF_FIELD_NAME');
    echo date('F Y', strtotime($date));
    // F = A full textual representation of a month, such as January or March
    // Y = A full numeric representation of a year, 4 digits
    ?>

    Other date formats can be found on this site: http://php.net/manual/de/function.date.php

    Hope i could help you.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Date picker help’ is closed to new replies.