Support

Account

Forum Replies Created

  • I used HealthCheck & Troubleshooting and discovered that I had this in my child theme’s functions.php (I don’t remember why…). I removed it and saved dates are back !

    // acf date format
    function acf_smart_dates($field) {
    if ($field[‘value’]) {
    $field[‘value’] = date(‘d/m/Y’,strtotime($field[‘value’]));
    }
    return $field;
    }
    add_filter(‘acf/prepare_field/type=date_picker’,’acf_smart_dates’);

  • I have the same problem. ACF pro 5.7.0 and previous version too. Website with WPML :

    I can pick the date and publish and it is saved correctly in the database…
    but when the edit (admin) page is reloaded while publishing, I get today’s date in the datepickers.
    So if I don’t pay attention and edit something else, the today’s date wipes out the date I had chosen the first time and my custom post start and end dates become today.

    Both start_date and end_date date fields currently have custom Ymd display format and 20180723 returnformat… because I was trying to debug a order by date query, and I thought there was a problem with american or french format : 31/12/2018 or 2018/12/31 or something like that. Values in database are 20181231. A forum post suggests increasing php.ini but not sure it’s relevant

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