Date field
Purpose
A calendar date without a time or time zone (birthday, event day, deadline).
Field type name
date
Settings
| Setting | Description |
|---|---|
| Instructions | Shown to editors below the field label. (max 2000 characters) |
| Default Value | Date (YYYY-MM-DD) returned when nothing has been saved yet. (max 10 characters) |
| Return Format | PHP date format for cafe_get_field(), e.g. "Y-m-d" or "j F Y". Month and day names follow the site language. (max 50 characters) |
| Earliest Date | Earliest allowed date (YYYY-MM-DD). Leave empty for no limit. (max 10 characters) |
| Latest Date | Latest allowed date (YYYY-MM-DD). Leave empty for no limit. (max 10 characters) |
| Translation | How the field behaves in other languages: translate, copy, copy_once or do_not_translate. Used on top-level fields when WPML is active. See WPML. |
| Width | Width on edit screens, to place fields side by side: 100 (full), 75, 66, 50, 33 or 25 (%). Phones always show full width. |
| Label per language | The label and instructions per language code while editing in that language, e.g. {"nl": {"label": "Prijs"}}. Set on the Translation tab when WPML is active. See WPML. |
PHP return value
Formatted with Return Format (PHP date format, default Y-m-d). Month and day names follow the site language (wp_date()).
Example
$date = cafe_get_field( 'event_date' ); // "2026-09-21"
// Or configure return_format "j F Y" to get "21 September 2026".