Filters the date field formats available for the Date Picker in the form builder.
wpforms_datetime_date_formats filter is applied to an array containing format options for date fields. These options are provided within the form builder when using the Date Picker option.
This filter can be used to add additional format options. The format will determine how date field selections are displayed to the user, how dates appear in entries and notifications, and also how date field selections appear within the database.
Default date format options include:
- m/d/Y: 01/31/2019
- d/m/Y: 31/01/2019
- F j, Y: January 31, 2019
- (array) (Required) Date format options.
Below explains what is contained in the array and the context of how it is used.
$date_formats = apply_filters( 'wpforms_datetime_date_formats', array( 'm/d/Y' => 'm/d/Y', 'd/m/Y' => 'd/m/Y', 'F j, Y' => 'F j, Y', ) );
Please see the PHP date reference for additional format options.