You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ACF Date Time Picker fields nested inside a ACF Pro Repeater field resolves as the epoch date/time (1970-01-01T00:00:00+00:00) in WPGraphQL queries when the Date Time Picker field's value date is more than 10 days in the past or future relative to the current date and time.
Dates within 10 days in the past or future, resolves with the correct date and time. Date Time Picker fields that are not nested inside a Repeater field resolves with the correct date/time for all future or past date/time values.
This bug appears to be similar to issue #212, though in that case it's a Date Picker field nested in a Flexible Content field.
Date Time Picker saved with value greater than 10 days in the future:
Resolved as the epoch date/time:
Date Time Picker saved within 10 days in the future:
Resolved as correct date/time:
Steps to reproduce
Create ACF Field group and assign it to post type of Page.
Add "Repeater" field and add a "Date Time Picker" sub-field.
On the post edit screen, add a new row int he repeater field and select a date/time value greater than 10 days in the past or future relative to the current date/time.
Query the post, repeater field, and date time picker field using GraphiQL IDE.
Description
ACF Date Time Picker fields nested inside a ACF Pro Repeater field resolves as the epoch date/time (1970-01-01T00:00:00+00:00) in WPGraphQL queries when the Date Time Picker field's value date is more than 10 days in the past or future relative to the current date and time.
Dates within 10 days in the past or future, resolves with the correct date and time. Date Time Picker fields that are not nested inside a Repeater field resolves with the correct date/time for all future or past date/time values.
This bug appears to be similar to issue #212, though in that case it's a Date Picker field nested in a Flexible Content field.
Date Time Picker saved with value greater than 10 days in the future:
Resolved as the epoch date/time:
Date Time Picker saved within 10 days in the future:
Resolved as correct date/time:
Steps to reproduce
PHP or JSON export of the ACF Field Group(s)
[
{
"key": "group_67782ed4aa68d",
"title": "Field Group",
"fields": [
{
"key": "field_67782ed4ac72a",
"label": "Repeater Field",
"name": "repeaterWithPicker",
"aria-label": "",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layout": "block",
"pagination": 0,
"min": 0,
"max": 0,
"collapsed": "",
"button_label": "Add Row",
"show_in_graphql": 1,
"graphql_description": "",
"graphql_field_name": "repeaterWithPicker",
"graphql_non_null": 0,
"rows_per_page": 20,
"sub_fields": [
{
"key": "field_67782ed4ad28f",
"label": "Date Time Picker",
"name": "nestedDatetimePicker",
"aria-label": "",
"type": "date_time_picker",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"display_format": "F j, Y g:i a",
"return_format": "d/m/Y g:i a",
"first_day": 1,
"allow_in_bindings": 0,
"show_in_graphql": 1,
"graphql_description": "",
"graphql_field_name": "nestedDateTimePicker",
"graphql_non_null": 0,
"parent_repeater": "field_67782ed4ac72a"
}
]
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "post"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"show_in_graphql": 1,
"graphql_field_name": "groupWithRepeater",
"map_graphql_types_from_location_rules": 0,
"graphql_types": ""
}
]
Additional context
No response
WPGraphQL Version
1.29.3
WPGraphQL For ACF Version
2.4.1
ACF (Advanced Custom Fields) Version. Free or Pro?
ACF Pro Ver. 6.3.11
WordPress Version
6.7.1
PHP Version
8.1.29
Additional enviornment details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.
The text was updated successfully, but these errors were encountered: