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 will be the Datepicker format which is d M, yy. This format will control how the date is displayed in the Date field. Get more information on Datepicker compatible formatsThe 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. This setting will be applied to the default date format for all date fields in your forms. 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 © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms