The quick version of how it works
To add a date or time picker to your contact form module, all you need to do is:
- add a normal Divi Contact Form module to a page.
- add a standard text input field to the form.
- in that field’s Field ID, write either datepicker or timepicker.
- add any additional strings (outlined in the sections below) to the Field ID after datepicker or timepicker to take advantage of other features.
The Date Picker
Basic Date Picker
By simply using the string datepicker in your field ID, you will be enabling the datepicker option on it.
Only allow dates after today
To prevent the user from selecting dates in the past, add _starttoday to the Field ID.
To disable weekends from being chosen in the calendar, add _disableweekends to the Field ID.
Set minimum date
Set the earliest date users can choose from by adding the string _mindateYYYY-MM-DD to the Field ID. The field for this example has June 10, 2018 set as it’s minimum date, which would look like this: _mindate2018-06-10
Set maximum date
Like the minimum date, you’re able to set the maximum date users can choose from by adding the string _maxdateYYYY-MM-DD to the Field ID. The field for this example has June 10, 2019 set as it’s minimum date, which would look like this: _mindate2019-06-10
Need to allow the user to select a date range on a single date picker field? No problem, add the string _daterange to the Field ID and you’re good to go.
Easier to Read Dates
If you prefer to show dates that are a little more friendly for users to read instead of the standard YYYY-MM-DD format, you can add the string _nicedate to show the date as something like “19 August 2018″ or “August 19, 2018″. The custom date format can be set on the plugin settings page.
Prefer to show an inline calendar? This plugin can do that too. Add _inline to the Field ID and you’re good to go.
Here are some of the most common questions I receive about the Divi Date Time Picker.
If you don’t see your question here, click here to visit my contact form.
Is there a custom module I need to use?
What is the license for this plugin?
Can I have more than one datepicker on a page?
Does this impact my GDPR compliance?
This plugin is powered by and requires Elegant Theme’s Divi Theme for WordPress, an insanely fast and incredibly intuitive front end editor like nothing you have seen before. It will change the way you build websites forever. (The above link is my affiliate link – if you purchase Divi through that link I may be compensated at no cost to you)