I don't know when the problem occured but now, when I save post, the date fields are incorrect.
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.
I set April 16 2020, the values are incorrect and I have the Json in field.
Metabox : 5.2.10
Metabox AIO : 1.11.5
Can u replicate the problem ?
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.
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.
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, ), ] ), ) );
I'm going to check it out and let you know later.
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.
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.
It's seems to be fixed.
Thank you 😀
Hi, I had a similar problem when i try to save a post via the REST API.
The post is a custom post type with a type=date and timestamp=true.
I've tried to POST the field with date "Y-m-d", date "d/m/Y", datetime "d/m/Y H:i:s", timestamp format but or it stay empty or it takes 1 and show First January 1970.
MB Rest API 1.4.0
Meta Box 5.3.8
Thanks for your feedback.
Updating the date field with the option
'timestamp' => true via REST API seems not working. Please turn it off and re-update, I will inform the development team to check on this case.
I'd like to simply turn off but I can't because I use it to order and filter the custom post type on the front end.
If I turn off the option I will end with data of different nature that i can't cast to order and filter. By now to order and filter I use a cast to NUMBER in the WP WP_Query.
I will wait for a fix, I'm using this feature in a project I'm developing.
Do you have an estimation of the resolution time?
Thanks a lot.