Going Stellar

Home/Jira fields reference

Jira Cloud fields and work types

Jira date picker custom field: set, read and search via API

The date picker takes and returns a plain date string in the form yyyy-MM-dd. Other formats are refused with a 400 that quotes the pattern. Rendered output follows the user's display format.

Endpoints

MethodPathWhat it does
PUT/rest/api/3/issue/{issueIdOrKey}Sets or changes the value.
GET/rest/api/3/issue/{issueIdOrKey}Reads the stored value.
POST/rest/api/3/issueCreates a work item with values.
POST/rest/api/3/search/jqlFinds work items by value.

Examples

PUT /rest/api/3/issue/{issueIdOrKey}

Sets the date; the response holds the same string.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10169": "2026-12-15"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10169'},
    json={'fields': {'customfield_10169': '2026-12-15'}},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "key": "ZZREF-6",
 "fields": {
  "customfield_10169": "2026-12-15"
 }
}

Sent to Atlassian Cloud on .

PUT /rest/api/3/issue/{issueIdOrKey}

A day-first date is refused with the expected pattern in the message.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10169": "15/12/2026"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10169'},
    json={'fields': {'customfield_10169': '15/12/2026'}},
)
print(r.status_code, r.text)

Response: HTTP 400

{
 "errorMessages": [],
 "errors": {
  "customfield_10169": "The zz-ref date must be of the format \"yyyy-MM-dd\""
 }
}

Sent to Atlassian Cloud on .

POST /rest/api/3/issue

Sets a date during create next to other custom fields.

curl

curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "ZZREF"
    },
    "issuetype": {
      "name": "Task"
    },
    "summary": "Created with custom fields",
    "customfield_10162": "on create",
    "customfield_10164": {
      "value": "Blue"
    },
    "customfield_10171": 7,
    "customfield_10169": "2026-12-01"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'ZZREF'},
                     'issuetype': {'name': 'Task'},
                     'summary': 'Created with custom fields',
                     'customfield_10162': 'on create',
                     'customfield_10164': {'value': 'Blue'},
                     'customfield_10171': 7,
                     'customfield_10169': '2026-12-01'}},
)
print(r.status_code, r.text)

Response: HTTP 201

{
 "id": "10789",
 "key": "ZZREF-10",
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/10789"
}

Sent to Atlassian Cloud on .

GET /rest/api/3/issue/{issueIdOrKey}

With expand=renderedFields the date is shown in the display format, while fields keeps the ISO form.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=customfield_10163,customfield_10169,customfield_10170' \
  --data-urlencode 'expand=renderedFields' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'fields': 'customfield_10163,customfield_10169,customfield_10170', 'expand': 'renderedFields'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "key": "ZZREF-6",
 "renderedFields": {
  "customfield_10169": "15/Dec/26"
 },
 "fields": {
  "customfield_10169": "2026-12-15"
 }
}

Sent to Atlassian Cloud on .

POST /rest/api/3/search/jql

Compares the field with a date literal in JQL.

curl

curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "jql": "project = ZZREF AND \"zz-ref date\" >= 2026-12-01",
  "fields": [
    "summary"
  ],
  "maxResults": 2
}' \
  'https://your-domain.atlassian.net/rest/api/3/search/jql'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/search/jql',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'jql': 'project = ZZREF AND "zz-ref date" >= 2026-12-01',
          'fields': ['summary'],
          'maxResults': 2},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "issues": [
  {
   "key": "ZZREF-10"
  },
  {
   "key": "ZZREF-6"
  }
 ],
 "isLast": true
}

Sent to Atlassian Cloud on .

How it behaves

  • Type key com.atlassian.jira.plugin.system.customfieldtypes:datepicker, searcher key com.atlassian.jira.plugin.system.customfieldtypes:daterange, schema type date, display name "Date Picker".
  • "2026-12-15" answered 200 and read back as "2026-12-15".
  • "15/12/2026" gave 400 'The zz-ref date must be of the format "yyyy-MM-dd"'.
  • Rendered output was "15/Dec/26" for the same value, while the stored form in fields was still "2026-12-15".
  • The JQL "zz-ref date" >= 2026-12-01 returned the two work items holding dates from 1 and 15 December.

Pitfalls

  • Send dates in the stored form even when the screen shows the day-first form; the API only accepts yyyy-MM-dd.
  • Do not parse the rendered string; it follows the viewing user and can change.
  • A date has no time zone, so it does not shift the way the date time picker does.

Questions and answers

What date format does the REST API accept for a date picker?

yyyy-MM-dd. A day-first value gave a 400 that quotes this pattern.

Sources

  1. Issues (Jira REST API v3)
  2. Issue fields (Jira REST API v3)
  3. Issue search (Jira REST API v3)

Markdown version · All Jira fields pages