How To Add A Date and Time Picker to the Divi Contact Form Tutorial by Pee-Aye Creative

How To Add A Date and Time Picker To The Divi Contact Form

Here's a super easy and very practical way to add a date and time picker to the Divi Contact form module. This is a great way to allow appointment bookings!

NOTE: The original tutorial shared here used a free plugin which is no longer supported. But we have a new solution! We have released a new plugin called Divi Contact Form Helper with date and time picker settings!

View the Date & Time Picker documentation in the Divi Contact Form Helper plugin.

FYI: You can do this with a setting directly in the Divi Contact Form module with our popular Divi Contact Form Helper plugin! Take a look, it is so easy!

Divi Contact Form Helper by Pee Aye Creative

Join subscribers on our YouTube channel and enjoy other Divi video tutorials!

1. Add A New Field

In a Divi contact form of your choice, click to edit the settings. Click on the “Add New Field” plus icon. The Field Settings will open with an input field for Field ID as well as Title. You can write something like “Choose a Date and Time” in the title field, that isn’t important. The most important part is the Field ID. Add the following CSS class there and save the form.


2. Add A Simple Plugin

Now that you have set the Field ID in the Divi Contact form, let’s go to the WordPress Dashboard and add a new little plugin. Go to Plugins>Add New and search for, install, and activate the plugin called Date Time Picker Field.

3. Adjust The Settings

Next, we need to add a simple line of code to the plugin settings.

Go to Settings>Date & Time Picker and paste in the following line:


It will look like this image below when you are finished. Be sure to save that.

Those are the most important parts for the tutorial that I need to show you. The rest of the settings need to be configured to your preferences. I suggest looking down through the basic and advanced settings to make sure the days, times, etc. are set how you want them.

4. Optional Design Improvement

We are using the method described in this tutorial on our call scheduling contact form. We hacked up the plugin styles a lot, and have pasted that code below for you to use if you want. You can customize the colors, etc. to your liking and past this in the Divi>Theme Options CSS box.

.xdsoft_datetimepicker {
   box-shadow: 0 15px 40px 6px rgba(0, 0, 0, 0.1)!important;

.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current {
   background: #2cba6c;
   box-shadow: #2cba6c 0 1px 3px 0 inset;

.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default:hover {
   background: #e03574!important;
   box-shadow: #e03574 0 1px 3px 0 inset!important;

.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
   color: #e03574!important;

.xdsoft_datetimepicker .xdsoft_datepicker {
   width: 350px!important;

.xdsoft_datetimepicker .xdsoft_timepicker {
   width: 100px!important;

.xdsoft_datetimepicker .xdsoft_calendar td,
.xdsoft_datetimepicker .xdsoft_calendar th {
   background: #ffffff;
   border: 2px solid #ebf8f1;

.xdsoft_datetimepicker.xdsoft_noselect.xdsoft_default {
   padding: 20px;
   border-radius: 10px;
   border: none;

.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div {
   background: #ffffff;
   border-top: 2px solid #ebf8f1;
   color: #333;
   font-size: 16px;
   text-align: center;
   border-collapse: collapse;
   cursor: pointer;
   border-bottom-width: 0;
   height: 36px;
   line-height: 36px;
   padding: 0 8px;

.xdsoft_datetimepicker .xdsoft_calendar td,
.xdsoft_datetimepicker .xdsoft_calendar th {
   background: #ffffff;
   border: 2px solid #ebf8f1;
   color: #333;
   font-size: 16px;
   height: 36px;

.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
   border-bottom: 2px solid #ebf8f1;

.xdsoft_time_box {
   border: 2px solid #ebf8f1;

The image below is how our contact form date and time picker looks.

Last updated Feb 1, 2022 @ 6:50 pm


Each month we send out a roundup email newsletter with the latest tutorials, product updates, helpful resources, and any other industry or personal news. Occasionally we send an extra separate email here and there if we just can’t wait! So that’s what you will get if you subscribe, and you can always unsubscribe at any time if you just can’t take it anymore :)

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

Nelson is the owner of Pee-Aye Creative in the beautiful state of Pennsylvania. He loves helping small businesses, exploring outdoors, building websites with Divi, and teaching others.

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy


  1. Samar

    Hey, that’s a great one!

  2. Vicki Robinson

    This is really a great tutorial! I’m trying to find something that will allow you to pick an arrival date and departure date (no times). Any suggestions?
    I’m not a coder and finding it difficult to find an easy solution.

    ~ Vicki

    • Nelson Lee Miller (aka The Divi Teacher)

      Hi Vicki,
      Yes, I believe you can do that easily with this same method. Just uncheck the option for “show times” in the plugin settings. You will probably need to create two separate fields in your form, one for arrival and one for departure.

  3. Hans

    I like the way you show how to use the date-time picker.
    There two things I would like to know, is there a way to make a separate fields, one for the date and the other for time? And is it possible to change the placeholder text to something custom in stead of the current date/time?

    Thanks for the fine tutorial.

    • Elba

      Yes Hans, on the plugin’s basic settings you can mark “keep placeholder” and it will display the text that you put on the form.

  4. Willem Prinsloo

    This filed does not have a placeholder option… How can we fix this? Pretty useless if we cannot change the placeholder…

  5. Tom

    Hi and thanks for the tips!

    Everything is working well for me.

    However I am wondering if you have any idea why it doesn’t work when I put the additional CSS in my child theme CSS sheet (instead of the parent one) ?



    • Nelson Lee Miller (aka The Divi Teacher)

      Hey Tom,
      It could be a number of factors, such as the enqueuing method, cache, and loading hierarchy. I’ve had issues with this for some things such as WooCommerce styles, for example, they work perfectly in the Divi Theme Options because they have a higher priority, but in my child theme stylesheet, they don’t work.

  6. Tom O'Neill

    Hey – this is awesome thanks – I can see the date/time picker populating but it’s behind some other layers/overlayers – any ideas on how I can ‘bring it to front’ essentially?

    • Lucas Lopvet

      add the z-index CSS rule, and set it very high.

  7. Gerard

    Great tutorial.
    I was looking for the option of adding a date Picker inside the Divi Contactform.
    Date for arrival and departure.
    In this case, your original (Divi) text will be override by the date.
    So a client can’t see were to fill in date for arrival or departure.

  8. gio

    Very useful and interesting.
    Your items are always of superior quality.
    Congratulations, it was useful for a customer.:-)
    Thank u buddy!

  9. Christina

    Thank you for the detailed tutorial. It really helped!

  10. Gio

    Hi. Thanks for this tutorial, really crazy. I ask you one thing: do you think you could use a field id where to show only the date and another where to show only the time? Thanks so much

  11. Gio

    I have seen that on Smartphone the data module exits the screen. Did you notice it?

  12. Mark

    Hi there! Thanks for this tutorial. I would love to implement it, HOWEVER it is not mobile-friendly. When you are on a cell phone, the date picker calendar hangs off the side of the phone screen and you can’t get to the rest of the dates.

    I went to your actual website to try it on my iPhone and it’s off the side of the screen. Do you have any code you could update this tutorial with in order to make this mobile friendly? If it doesn’t work well on cell phones, it’s not really a complete solution for me.

    It’s great up to this point, so adding mobile support would make it perfect. Looking forward to hearing back from you!

      • Mark

        Thanks. I went in and implemented this on a test website this morning. If you don’t add any width information, the picker fits on a phone just fine. I decided to go in and give it a defined width of 325px so that it’s guaranteed to fit down to an iPhone 5. Also, I discovered that you can pretty much get away without using !important tags if you just put “body .xdsoft_datetimepicker” at the beginning of each CSS selector. The only times I had to use important was when adjusting hover colors. For some reason, the dev used their own important tags on hover colors. Thanks for finding this solution and getting me started. I found it just in time for a project I’m working on.

  13. Vic

    This is a great plugin! I was wondering if how could it work if the form has 2 fields that require date and time like “Start date (field 1) and End date (field 2)?

    Thank you!

    • Abigail Valdés

      did you found out if its possible?? i have the same question 🙁

  14. Bassam Disi

    Hello, date time Picker plugin is a greet one.
    Please what I have to do to make clendor, time mobile responsible?

  15. Audrey

    Hi! I’m wondering how I would use this plugin for 2 fields in the same form. I’m not sure how to use the selector for 2 differences ids.

    • Abigail Valdés

      i have the exact same question 🙁 did you find an answer?

    • Maaz Khan

      hey man you can do it like that,

  16. JAke

    Hi there
    When I activate the plugin, I get this error message on the error log:

    PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/htdocs/wp-content/plugins/date-time-picker-field/includes/DateTimePicker.php on line 431

    The site will not load when the plugin is activated. Do you know why?


  17. luca.zaninello

    Hi Nelson,
    this is what I needed, thank you.
    I’m asking a little more bit.

    I’ve one field for Arrival date and another one for Departure: if I select a certain date as Arrival (let’s say July 25) is it possible that the calendar in the Departure field starts from July 26?

    Thanks for any suggestion,

    • Abigail Valdés

      Hi, how did you make it possible to add two fields with the calendar option? but its doesnt let me because the id changes 🙁 so it doesnt work.

  18. Charles McClinon

    I have added the date and time picker to the contact form. Everything works great until I use it as a popup. When a user clicks on the calendar, it will not display. However, when it functions solely as a section, the module works just fine. To demonstrate the difference click on the button that reads “schedule now” in the first section below the primary menu. A section will pop up. Place your cursor in the “Choose Date and Time” field. No calendar. Scroll down the page and find a duplicate of the section. Place your cursor in the “Choose Date and Time” field. The calendar will popup. What could be the conflict here?

    • Nelson Lee Miller (aka The Divi Teacher)

      Hi Charles,
      I’m not really sure what you mean by the popup since that’s not part of Divi. It’s probably something to do with either having two on the same page or something with that popup plugin code.

  19. Luis Maia

    Hi Nelson, I have use this plugin a couple of times and it really solve the problem.

  20. TMM

    Hi! Great tutorial! Thank you so much 🙂
    I have a question about Design Improvement. I’m using your CSS code to customize it, but i can’t change the orange color of the hover (I can’t find the color code). Can you help me? Thanks in advance!!

  21. Abigail Valdés

    Hello, is there any way to add two fields with the calendar option? I cant add more than one because the id changes 🙁 or is this just an option for the “pro” version?

  22. Philippe

    Hi! Thanks for the great article.

    I was wondering if it would be possible to generate different shortcode each associated with different allowed time. This way we could use it as a booking tool for something with different location/availability.

    Thanks again,

      • Philippe

        That’s allright 🙂

        I followed your tutorial to the letter but it doesn’t seem to work for me.

        I’m using:

        in the CSS Selector and date-time-picker-drummond for the field ID but the date piker does not show on my page.

        Do you have any idea as to why it does not work?

        Thanks 😀

  23. Thaabit Van schoor

    im having an issue with the pop up, on desktop its perfect is there anyway to always auto align it to the middle of your screen on mobile and also its not possible to scroll on the popup

  24. Gerard Drent

    Hi Nelson,
    I’m making a request form including 20 date questions.
    To use date time picker I made 20 fields with different names.
    But, they don’t work.
    Do I make some mistakes?


  25. chris

    You Rock ! Awesome, thanks for your great job

  26. andres

    Hi thanks for the tutorial, can i use 2 date picker in the same page ?

  27. theCreativeMind

    happy new year! another great tutorial … is there a way to sync 2-way the date picker to a google calender … e.g. the already occupied days would be blocked already or such…

  28. Yash patel

    Hey, it’s really good stuff. I find booking slot system for saloon
    and suddenly I find this guy !!!!

  29. Hallie Halpern

    thank you so much!

  30. Emrah

    hello, where can he change the time format

  31. Mikhail Schrader

    I am trying to get the calendar selector to my Divi contact form but it seems to not work? Can you help?

  32. Mikhail Schrader

    This works amazing if the form is fixed. i have a contact form as a popup and therefore the calendar option is opening behind the pop-up. How can i fix this.

    • Hemant Gaba

      Please share the URL of the page where the issue is happening so that I could investigate further. 🙂

  33. Tobias
    Nice! Thanks
  34. Sharon Westin

    Hi, Where do you change the orange colour in your code?

    • Hemant Gaba

      I am assuming that you are talking about the orange color that is coming on hover. That orange color by default comes on hover and there is no code for that in the given snippet. If you want to change the orange color on hover then you can use these CSS snippets:

      /*This is for the hover color on dates*/
      .xdsoft_datetimepicker .xdsoft_calendar td:hover{
      background-color: red !important;
      /*This is for the hover color on Time*/

      .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{
      background-color: red !important;


      You can place your preferred color at the place of red. Please let us know if that helps. 🙂

      • Giovanni

        can you write maybe the code for the dark style? Becouse your code work only on default theme. Thx for the great tutorial

  35. Arthur

    Hi Nelson, I believe this plugin has been updated. I tried to follow the same steps shown here but was unable to make it work. Do you have any tips on the new version of this plugin?

    Even on their website ( they have some instruction on how to use it in Divi, but the options they say to select, do not exist within the plugin.

    Any help will be greatly appreciated!

    • Chiara Ceschini

      I have the same problem! Doesn’t work to my website either

      • juanse

        Click on the integration menu and you just have to delete the point “.” that appears at the beginning of the default text, in the Css Selector field. Copy the resulting text and paste it into the field ID of the form. In my case the default code was .input597 and I deleted the initial point and it was: input597. It worked very well. I apologize for my English.

  36. Lefteris

    After plugin update, in the Input WP -> Integrations -> CSS Selector if you paste

    input[data-original_id=’date-pickup’], input[data-original_id=’date-dropoff’]

    the plugin add slashes into the name and show like this

    input[data-original_id=\’date-pickup\’], input[data-original_id=\’date-dropoff\’]

    Then date time picker not show.

    • KY Wong

      Hi there guys, is there solution on this now? or it’s still not working?

    • Ganga

      Yes this tutorial is not working

  37. M Afzaal - IT Specialist


    new update the pluign. Every time when I client in the update in the CSS selector \\ is appears. How to fix that issue.

    • Erik Reemst

      We have this to..

  38. Roge

    There’s been an update on the plugin. No need to input the “input[data-original_id=\’pa-date-time-picker\’]”, just put “pa-date-time-picker” (no quotes) and it will work again.

  39. Brian Rice

    There are a lot of bad reviews recently for this plugin, you may want to update the article.


Submit a Comment

Your email address will not be published.

Recent Posts


Your Cart