BUG in custom field Date in clonable group

Support MB Group BUG in custom field Date in clonable group

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #50176
    HazmiHazmi
    Participant

    Hi,

    if I save the date using the following code in a separate custom field (outside the Group), it is saved in the database in the format Y-m-d. Which is fine. If I save it inside the Group, it is saved in the database in the format d. m. yy, which is an error.

    I will request an urgent fix, as this is still under further work.

    [
    			'id' => 'dateFrom',
    			'type' => 'date',
    			'save_format' => 'Y-m-d',
    			'js_options' => [
    				'dateFormat' => 'd. m. yy'
    			]
    		],
    #50177
    PeterPeter
    Moderator

    Hello Hazmi,

    Thanks for reaching out.

    We already noted this case in the documentation https://docs.metabox.io/extensions/meta-box-group/#data-storage

    If you add a date field inside a group and set a save_format that differs from the display format, the save_format will not be applied. In this case, the saved value will always match the displayed value - no formatting changes are made during saving.

    If you want to save the date value in a different format, please move it outside of the group field.

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