Home › Forums › General Issues › Date picker showing today's date instead of selected date › Reply To: Date picker showing today's date instead of selected date
i would use return format: Ymd
(better for ordering and strtotime)
and than use:
setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8'); //change to language you wish to display
$dl_date = get_field('dl_date'); //is $dl_date filled correct? or is it empty?
$dl_date = (strtotime($dl_date));
$dl_date_pretty = date_i18n( 'F d Y', $dl_date); //here you can change display of date format
//with help of date_i18n you can use setlocale to display a date with language you wish
echo $dl_date_pretty;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.