Support

Account

Home Forums Backend Issues (wp-admin) Date Time Picker and Post Loop Reply To: Date Time Picker and Post Loop

  • Hi @poorpaddy

    ACF PRO saves the date time picker field in a MySQL’s date time format (yyyy-mm-dd hh:mm:ss). So, you need to change how you get the current date time and the ‘type’ query like this:

    $currentdate = date('Y-m-d H:i:s');
    ...
    'type' => 'DATETIME',

    This page should give you more idea about it: https://www.advancedcustomfields.com/resources/date-time-picker/.

    I hope this helps 🙂