
The Date field can store a date value in various formats.
Contents
Quick Start
- Fill out the Basic Field Settings (Label, Description, and Field Name)
- Select Field Type: Date.
- Click Save New Field (or Save Field if you’re updating an existing field) to save your field configuration.
Settings
- Date Format Type
The options available are:- WordPress default
- Predefined format
- Date Format (predefined)
You can choose the predefined format you want to display the date as. The options available for date formatting are:- 10/08/2008
- 10-08-2008
- 10.08.2008
- 2008/10/08
- 2008-10-08
- 2008.10.08
- October 8, 2008
- October 8th, 2008
- 2008-10-08T11:37:22-05:00
- 08/10/2008
- 08-10-2008
- 08.10.2008
- 08/Oct/2008
- 08-Oct-2008
- Date Format (predefined)
- Custom format
- Date Format for Display
Enter a custom date format to use. - Date Format for Input
Enter a custom JS date format to use.
- Date Format for Display
- Year Range
Enter a year range to restrict the date within. - Allow empty value
When enabled, this will allow an empty value to be saved. Otherwise, the current date will be used. - Enable HTML5 Input Field
When enabled, this will render the field withtype="date"using the default browser interface. Based on your needs, the browser interface may be a better experience especially for mobile devices. For more details on HTML5 types, you can read the documentation at W3 on Validating Common Input.
Custom PHP Date Formats
You’ll find this information documented on the Date / Time Field doc page.
Custom JS Date Formats for Input
You’ll find this information documented on the Date / Time Field doc page.
Year Range Format
You’ll find this information documented on the Date / Time Field doc page.
How to Display
Display with a Shortcode
[pods field="my_date_field"]
Display with PHP: pods_field_display()
<?php echo pods_field_display( 'my_date_field' );
Display with PHP: $pod->display()
<?php $pod = pods(); echo $pod->display( 'my_date_field' );