Date/Time Field

Written by the Divi Engine Documentation Team

Watch This Video


Follow these steps to learn how to add a date/time field type to your form.

Step 1: Select Date/Time Field

To use the Date/Time field type select it from the Type dropdown in the main content settings of the Form Module.

Step 2: Define Date & Time Format

Using the codes below, define both the date and time formats.

Date Formats

  • d : day of month (no leading zero)
  • dd : day of month (two digit)
  • o : day of year (no leading zeros)
  • oo : day of year (three digit)
  • D : day name short
  • DD : day name long
  • m : month of year (no leading zero)
  • mm : month of year (two digit)
  • M : month name short
  • MM : month name long
  • y : year (two digit)
  • yy : year (four digit)

Important: When specifying the year format, use 'yy' for a four-digit year (e.g., 2024). Avoid using 'yyyy' as it will incorrectly repeat the year, resulting in an output like 20242024, which is not valid. Please ensure to follow the correct format codes provided above for accurate date and time representation in your forms.

Time Formats

  • HH : 24 hour format with leading zero 
  • H : 24 hour format without leading zero 
  • hh : 12 hour format with leading zero
  • h :  12 hour format without leading zero
  • mm : minute with leading zero 
  • m : minute without leading zero
  • ss : second with leading zero
  • s : second without leading zero
  • l : millisecond
  • c : microsecond
  • z/Z : Timezone Offset String
  • T : A/P
  • TT : AM/PM
  • t : a/p
  • tt : am/pm

Step 3: Define Date/Time Layout Options

Give your Date/Time field some style in the Layout Options section by setting the position and placeholder text.

Step 4: Customize The Form

Customize the rest of your Form using our documentation to your left. There you will find, among other topics, a  detailed description of the Form Module settings along with how to set up a contact form, login form, post create form and so on.

Step 5: View The Result

View the result from the frontend.

More Support?

Please email us at [email protected] if you are unable to get Divi Form Builder working.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.