Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_datepicker_formats

Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

This hook can be used to add a custom date format in your Global Settings for Date Formats. The first date format is the PHP date format, which is 'j M, Y' in the example below. Get more information on PHP date formats. The second date format is the jQuery datepicker format, which is d M, yy. With the jQuery date picker library, this format controls how the date is displayed in the Date field. With the Flatpickr date picker library, the default since Formidable Forms 7.0, the Date field displays the date with the PHP date format instead. Get more information on Datepicker compatible formats. The Datepicker date format must correspond to the appropriate PHP date format.

Usage

add_filter('frm_datepicker_formats', 'add_custom_frm_format');
function add_custom_frm_format( $formats ) {

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $formats (array)

Examples

Change Date Format

Use this code example to add a date format option in the Global Settings. Then go to Formidable → Global Settings → General Settings, select the new format in Date Format, and click Update.

This setting changes how all Date fields in your forms show the date on the form. The entry detail page keeps its own date display. Read more on the date formats using the jQuery datepicker and PHP date format.

Replace 'j M, Y' with the PHP date format. Replace 'd M, yy' with the jQuery date format.

add_filter('frm_datepicker_formats', 'add_custom_frm_format');
function add_custom_frm_format($formats) {
   $formats['j M, Y'] = 'd M, yy'; //change PHP and Datepicker formats
   return $formats;
}

For example, if you want to display the date format as Sat Mar 7, change line 3 to:

$formats['D M j'] = 'D M d';

Change Log

Added in version 2.0.11

Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms