Support

Account

Home Forums General Issues PHP Import date field format

Solving

PHP Import date field format

  • Hello,

    in my plugin I import some acf’s like this:

    array (
    			'key' => 'field_577f6dcef50c0',
    			'label' => 'balba',
    			'name' => 'balba_date',
    			'type' => 'date_picker',
    			'instructions' => 'Wählen Sie das balba des sdg aus.',
    			'required' => 1,
    			'conditional_logic' => 0,
    			'wrapper' => array (
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'display_format' => 'd.m.Y',
    			'return_format' => 'd.m.Y',
    			'first_day' => 1,
    		),

    But the format in the database and when i call get_field(“balba_date”) is like “YYYYMMDD” but i want a format like “d.m.Y” anyone have a solution for this problem?

  • Hi @mathishuettl

    I’ve just tested it on my installation but failed to reproduce the issue. Did you use the Local JSON feature or have the field group registered on the field group editor page on the backend? If you used them, could you please delete them?

    Also, could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Thanks 🙂

  • Hi @mathishuettl

    I’ve just tested it on my installation but failed to reproduce the issue. Did you use the Local JSON feature or have the field group registered on the field group editor page on the backend? If you used them, could you please delete them?

    Also, could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Thanks 🙂

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

The topic ‘PHP Import date field format’ is closed to new replies.