Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 845 Bytes

date-picker.md

File metadata and controls

40 lines (30 loc) · 845 Bytes

Date Picker Field

The Date Picker field is added to the WPGraphQL Schema as field with the Type String.

Date Picker fields can be queried and a String will be returned.

Here, we have a Date Picker field named date_picker on the Post Edit screen within the "ACF Docs" Field Group, and "13/03/2020" is the date set.

Date Picker field in the Edit Post screen

This field can be queried in GraphQL like so:

{
  post(id: "acf-example-test", idType: URI) {
    acfDocs {
      datePicker
    }
  }
}

and the result of the query would be:

{
  "data": {
    "post": {
      "acfDocs": {
        "datePicker": "13/03/2020"
      }
    }
  }
}