### [How to Allow Date Range or Multiple Dates in Date Picker](https://wpforms.com/developers/allow-date-range-or-multiple-dates-in-date-picker/)

**Published:** September 29, 2020
**Author:** Umair Majeed

**Excerpt:** This tutorial will show you how to allow for either a date range or multiple dates to be chosen from your WPForms date picker form field. 

**Content:**

Would you like to customize the **Date Picker** field to allow for a date range or multiple dates to be selected inside your form? When you allow for multiple bookings in one form, you may need to give your visitors the ability to select a range of dates or multiple dates. By default, only a single date can be selected within this calendar.

In this tutorial, we’ll show you how to use PHP to provide a date range or multiple date selections for your WPForms.

**Note:** When using snippets for the Date Picker, it’s best turn **off** any of the built-in features WPForms provides in the form builder for further restricting dates. For more information, [please see this documentation](https://wpforms.com/docs/how-to-limit-options-for-the-date-time-field/).

## Creating the form

First you’ll need to create your form and add at least one **Date/Time** form field and set the field to **Date Picker**.

If you need any assistance in creating a form, [please review this documentation](https://wpforms.com/docs/creating-first-form/ "How to Create Your First Form").

![just create your form and add your date picker field to the form](https://wpforms.com/wp-content/uploads/2020/09/wpforms-add-date-picker.jpg)## Allowing for a date range or multiple dates

Once you’re form is created, choose if you’d like to allow for a date range or to allow for multiple dates to be selected in your form and add that snippet to your site.

If you need any help in how to add snippets to your site, [please see this tutorial.](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms")

**Note:** Please note that if you edit these entries, the entry screen doesn’t support date range or multiple dates. This snippet is only for the frontend users of your forms.

#### Date Range

This particular snippet will allow for all date pickers to select a range of dates for all forms.

```

/**
 * Modify WPForms Date/Time field date picker to accept a range of dates.
 *
 * @link https://wpforms.com/developers/allow-date-range-or-multiple-dates-in-date-picker/
 */
 
function wpf_dev_date_picker_range() {
?>

**Categories:** Fields

**Tags:** Date Time Field, Javascript, PHP

---

