Custom Fields
Re-Envisioned
Support General Date field, timestamp problem ?

  • Creator
    Topic
  • #19250
    Resolved Charlin
    Participant

    Hello,

    I don’t know when the problem occured but now, when I save post, the date fields are incorrect.

    Example

    array(
                  'name' => 'Date de début',
                  'id'   => 'start_price_date',
                  'type' => 'date',
                  'timestamp' => true,
                ),

    I can set date with the Datepicker but when post saved, the result is that one.

    {"timestamp":"2020-04-16","formatted":"1970-01-01"}

    I set April 16 2020, the values are incorrect and I have the Json in field.

    Wordpress: 5.4
    Metabox : 5.2.10
    Metabox AIO : 1.11.5

    Can u replicate the problem ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #19256
    Long Nguyen
    Moderator

    Hi,

    I’ve tested the field Date on my local site, it saves and displays the date (human-read) as well. Could you please deactivate all plugins except Meta Box plugins then check the problem again? If it still happens, please try to open the Console tab in Developer tool and let me know if there are any error notice.

    #19261
    Charlin
    Participant

    Hello,

    I debug a little “more” with a functional version, it doesn’t work when I update meta box and meta box aio.

    No error on console.

    The meta are in custom post type “product” of Woocommerce plugin.

    #19262
    Charlin
    Participant

    I made more test on a fresh install, the problem occured when field date is on “group”.

    $meta_boxes[] = array(
            'title'  => 'Hello World',
            'post_types' => array( 'post', 'page' ),
            'fields' => array(
                array(
                    'id'        => 'my_group',
                    // 'name'      => 'My Group',
                    'type'      => 'group',
                    'clone'  => true,
                    'sort_clone' => true,
                    'fields' => [
                        array(
                            'name' => 'My Date',
                            'id'   => 'my_date',
                            'type' => 'date',
                            'timestamp' => true,
                        ),
                    ]
                ),
            )
        );
    #19264
    Long Nguyen
    Moderator

    Hi,

    I’m going to check it out and let you know later.

    Thank you.

    #19279
    alpha.media
    Participant

    I am also seeing a problem after updating Metabox and Metabox Group in the past few days. It’s been a while since this feature has been coded so i’m not quite sure the problem but something is up with the latest release and the datetime field saving.

    #19307
    Long Nguyen
    Moderator

    Hi guys,

    Please update the new version of MB AIO to v1.11.6 or MB Group to v1.3.10 then check this problem again. Let me know how it goes.

    #19308
    Charlin
    Participant

    It’s seems to be fixed.

    Thank you 😀

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.