Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Datepicker Options for Forms

Last Updated: July 22, 2022

Knowledge Base → Add-Ons → Appearance and UI → Datepicker Options for Forms

The Datepicker Options plugin adds a bunch of extra options to date fields in WordPress forms.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Datepicker options form

Subscribe on YouTube

Read more: How to Create a WordPress Form With a Datepicker Calendar

Download and install

  1. If you haven't already done so, install and activate Formidable Forms Pro.
  2. In your WordPress admin, go to Formidable → Add-Ons and click the 'Install' button for the WordPress Datepicker Options plugin.

Set minimum/maximum dates

The Formidable Forms Pro plugin includes the option to set a dynamic year for the start and end year range. But if you would like this range to change when another date field changes, or set a more specific range that starts or ends on a specific date rather than at the beginning or end of the year.

  1. Open the field settings for the date field in your form.
  2. Check the box to 'Set specific minimum and maximum dates'.
  3. The minimum and maximum dates can be set in a number of ways.
    • Select 'Current date' and insert +0 for the minimum date to not allow past dates to be selected. ie book an appointment
    • Select 'Current date' and insert +0 for the maximum date to not allow future dates to be selected. ie select a birthdate
    • Select 'Current date' and insert -18 years for the maximum date to only allow someone who is over 18 to submit the form.
    • When using two date fields, set the second field to start 2 days after the date selected in the first field. In the second field, select the name of the first date field from the dropdown and insert +2 days in the box.

Using negative numbers for minimum date

If you want to restrict users from choosing a date 90 days prior to the current date, you can use negative numbers for the minimum date.

  1. Open the field settings for the date field in your form.
  2. Set a dynamic year range by inserting -1 for the Start Year and +0 for the End Year. This will set the start date to last year and the end date to the current year.
    Datepicker options Restrict year range
  3. Check the box to 'Set specific minimum and maximum dates'.
    Datepicker options Restrict Minimum Maximum

    • Set the minimum date by selecting 'Current Date' and insert -90 days to not allow dates 90 days prior to the current date to be selected.
    • Set the maximum date by selecting 'Current Date' to not allow future dates to be selected

Blackout weekends

  1. Open the field settings for the date field in your form.
  2. Uncheck the 'All days' box for 'Days of the week'.
    Datepicker options without blackout days
  3. Now you'll see a list of each day of the week. Uncheck the boxes for any days of the week you do not want to allow.
    Datepicker blackout days

Here's the result:
Datepicker with blackout weekends

Add an exception

When a day of the week is disabled, but there is a date you would still like to be selected, you'll need to add an exception. For example, if you blockout Saturdays but there are two Saturdays you would like to allow, add exceptions.

  1. After blacking out a day of the week, the 'Exceptions' link will appear.
  2. Click this link and select the dates that should be selectable in your datepicker.
    Datepicker options with exceptions to blackout days

Add a blackout date

When there are specific dates (like a holiday) that should be excluded, use the 'Blackout Dates' option.

  1. Open the field settings for the date field in your form.
  2. Click the 'Blackout Dates' link and a datepicker will appear.
  3. Select each date that should be blacked out in your form.

Show inline datepicker

When the datepicker is set to show inline, it will appear on the form instead of a text field to click. To show the datepicker directly in the form, check the box to Display Inline Date Picker in the field options.

Inline datepicker

Book appointments

If you need more scheduling options, like booking a unique time slot, take a look at the Simply Schedule Appointments plugin. It's an easy and fast way of setting up open times in a schedule to allow a single visitor to select an open slot.

Add an Appointment field to your form and select the type of appointments you'd like to book.
Appointment form setup

Then your visitors can select a date, then a time.
Schedule appointments in WordPress forms

Related developer hooks

  • Black out dynamic dates with the frm_date_field_options hook.
  • Hide month and year selectors with the frm_date_field_options hook.
  • Add a clickable calendar icon next to to the datepicker with the frm_date_field_options hook.

Related Articles

  • How to add Age Restrictions How to Add Age Restrictions in WordPress Forms
    Read More
    how to create an inline form in WordPress How to Create an Inline Form in WordPress
    Read More
    wordpress form datepicker calendar How to Create a WordPress Form with a Datepicker Calendar
    Read More
  • Download and install
  • Set minimum/maximum dates
    • Using negative numbers for minimum date
  • Blackout weekends
    • Add an exception
  • Add a blackout date
  • Show inline datepicker
  • Book appointments
  • Related developer hooks
  • Related Articles
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

You do not have permission to view this form. Maybe you need to log in?

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.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews