Support

Account

Home Forums Bug Reports Date

Solved

Date

  • Hi,

    There seems to be a bug with Date Picker field. Regardless of the date picked, it resolves to current days date after saving the post. I’m currently using ACF 4.2.0. Screenshots attached. Any suggestions?

    ACF admin area:
    http://d.pr/i/dD1h

    Post page after saving.
    http://d.pr/i/tT7k

  • Hi @cosmoo

    What have you set as the save format?

    Also, can you check your database to make sure a value is saving in the postmeta table?

  • Hi @elliot,

    Date save format is ‘Ymd’. I will check the database and respond back asap.

  • Hi @elliot,

    Here is the data from ‘postmeta’ table.

    a:11:{s:3:"key";s:19:"field_51f95d72c7c5a";s:5:"label";s:4:"Date";s:4:"name";s:4:"date";s:4:"type";s:11:"date_picker";s:12:"instructions";s:36:"Please select the date of your event";s:8:"required";s:1:"0";s:11:"date_format";s:3:"Ymd";s:14:"display_format";s:8:"dd/mm/yy";s:9:"first_day";s:1:"1";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_51f846266fda1";s:8:"operator";s:2:"==";s:5:"value";s:6:"Events";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:4;}

  • Hi @elliot,

    BTW…another issue, after selecting a date and saving the post, date field is empty. Empty field occurs more often than current days date.

  • Hi @cosmoo

    The database value you have pasted is not the value, it is the field object.

    Please edit a posd note it’s post_id in the URL.

    Now look in the wp_postmeta table for a row which has a post_id of the post’s ID, and a meta_key of the field’s name. What is the meta_value?

    Is it possible that you have another field on the edit screen with the same field name?

  • Hi @elliot,

    I was able to work around the issue. Save format for date field was set to ‘Ymd’, replaced it with ‘yymmdd’ and this resolved the issue related to showing current days date and empty fields after saving.

    Seems like that was the main issue. Thanks for you help!

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

The topic ‘Date’ is closed to new replies.