---
title: "Date Time Picker Field in WordPress"
url: https://nexterwp.com/docs/wordpress-date-time-picker-field/
date: 2026-11-12
modified: 2026-11-12
lang: en
author: "Aditya Sharma"
description: "A date time picker field stores a date and a time together — an open house, a webinar start, a deadline — so the moment is unambiguous. What It Does..."
image: https://nexterwp.com/wp-content/uploads/2026/09/wordpress-date-time-picker-field-1024x519.jpg
word_count: 441
---

# Date Time Picker Field in WordPress

## Key Takeaways

- Nexter Extension 4.9.0 adds a Date Time Picker field in Nexter → Content Fields, and the field group builder offers General, Validation, Presentation, and Conditional Logic tabs.
- Y-m-d H:i:s is the safe Return Format for sorting and comparison, because comparing against “now” in a query uses strings and only that format sorts correctly as text.
- The stored value carries no time zone, so it is interpreted in the site time zone under Settings → General and can shift by an hour during daylight saving.

A **date time picker field** stores a date and a time together — an open house, a webinar start, a deadline — so the moment is unambiguous.

## What It Does

This is the field to use when a date alone is not enough. Storing both parts in one value keeps them in step, which two separate fields do not guarantee.

## Before You Start

- Nexter Extension is installed and active.- Content Fields is enabled under **Nexter → Content Fields**.- You have a field group, or are about to create one.

## Add a Date Time Picker Field

- Go to **Nexter → Content Fields** and open the **Group Fields** tab.

- Open a field group, or create a new one.

- Click **Add Field**.

![A field group open with the Add Field button](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-h-shared-add-field.webp)

- Set **Field Label** to *Open house*. The **Field Name** fills in automatically and is what you use in code.

- Set **Field Type** to **Date Time Picker**.

![The Field Type dropdown listing the available field types](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-h-shared-field-type.webp)

- Set **Display Format** for the picker.

![The Date Time Picker field settings in the Content Fields builder](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-h-openhouse-settings.webp)

- Set **Return Format** — `Y-m-d H:i:s` is the safe choice for sorting and comparison.

- Click **Update**.

![The Date Time Picker field as it appears on the post editing screen](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-h-openhouse-editor.webp)

## Field Settings

Every field is configured across four tabs. These are the settings this field type offers, read from the field group builder in Nexter Extension 4.9.0.

### General

| Setting | Options | What it does |
| ------- | ------- | ------------ |
| **Display Format** | | *No help text in the UI.* |
| **Return Format** | | *No help text in the UI.* |
| **Week Starts On** | `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` | *No help text in the UI.* |
| **Start on the current date** | | Start new items on the current date. |

### Validation

| Setting | Options | What it does |
| ------- | ------- | ------------ |
| **Required** | | *No help text in the UI.* |

### Presentation

| Setting | Options | What it does |
| ------- | ------- | ------------ |
| **Instructions** | | *No help text in the UI.* |
| **Wrapper Attributes** | | *No help text in the UI.* |

### Conditional Logic

| Setting | Options | What it does |
| ------- | ------- | ------------ |
| **Conditional Logic** | | *No help text in the UI.* |

## When to Use It

- An open house or viewing appointment.- A webinar or session start.- A submission deadline.

## Display the Value

With `Y-m-d H:i:s` returned, the value goes straight into date functions:

`<?php
$when = nxt_field_value( 'openhouse' );
if ( $when ) {
$ts = strtotime( $when );
echo esc_html( date_i18n(
get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
$ts
) );
}`

## Limitations

- The value carries no time zone. It is interpreted in the site time zone set under **Settings → General**, which matters if your audience is in another one.- Comparing against “now” in a query means comparing strings, so **Return Format** must be a sortable format.

## Troubleshooting

### Upcoming events are in the wrong order

**Return Format** is a display format. Only `Y-m-d H:i:s` sorts correctly as text.

### Times are off by an hour twice a year

That is daylight saving. The stored value has no time zone, so converting it through a timestamp shifts with the site time zone.

## Related Docs

- [Create your first field group](https://nexterwp.com/docs/create-a-field-group-wordpress/)- [Display a field value on the front end](https://nexterwp.com/docs/display-custom-field-value-wordpress/)

## Frequently Asked Questions

**Q: Why use a date time picker instead of separate date and time fields in WordPress?**
A: A single date time picker keeps the date and time together in one value, so the moment stays unambiguous. That matters for things like an open house, webinar start, or deadline, where splitting the data into two fields can let the parts drift out of sync. Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter offers this field type for cases where exact timing matters more than just the date.

**Q: How do I add a date time picker field in WordPress with Nexter?**
A: The field is added from Nexter → Content Fields in the Group Fields tab. Open an existing field group or create one, click Add Field, set the Field Label and choose Date Time Picker as the Field Type. The page also notes that the Field Name fills in automatically and is what you use in code. That makes setup faster and reduces naming mistakes when you later display or query the value.

**Q: What return format should I use for a WordPress date time picker field?**
A: Y-m-d H:i:s is the safe choice because it sorts correctly and works cleanly for comparison. The page also says Return Format is what matters when comparing against “now” in a query, since that comparison happens as strings. If you pick a display-style format instead, upcoming events can sort incorrectly even though the dates look fine to people reading them.

**Q: Why are my upcoming events showing in the wrong order?**
A: The usual cause is Return Format. The page says only Y-m-d H:i:s sorts correctly as text, while a display format does not. That matters because comparing against “now” in a query means string comparison, not a true date comparison. If event order matters, keep the stored value sortable and handle presentation separately on output.

**Q: Why are my event times off by an hour twice a year?**
A: That pattern points to daylight saving time. The stored value has no time zone, so when it gets converted through a timestamp it shifts with the site time zone set under Settings → General. That means the same saved value can display differently during DST changes. For scheduling content tied to exact local time, this is the main gotcha to watch.

**Q: How do I display a date time picker value on the front end?**
A: With Y-m-d H:i:s returned, the value can go straight into PHP date functions. The example on the page uses nxt_field_value( 'openhouse' ), converts it with strtotime(), then formats it with date_i18n() using get_option( 'date_format' ) and get_option( 'time_format' ). That approach keeps storage sortable while letting you show visitors a normal site-formatted date and time. See [Display a field value on the front end](https://nexterwp.com/docs/display-custom-field-value-wordpress/).
