# Managing Dates

> You are able to set a minimum or a maximum date for your **Date / Time** component of your form, as well as restrict the user selection of specific dates.

You are able to set a minimum or a maximum date for your **Date / Time** component of your form, as well as restrict the user selection of specific dates.

**Setting a Relative Date**

**Removing Dates from User Selection** To make one or more specific dates unavailable for selection within the form, use the **Disable specific dates or dates by range field**. Use the `YYYY-MM-DD` format to specify the desired dates.

The checkboxes allow you to make unavailable for selection every weekend or every weekday.

## Tutorial

To use this feature:

1. Navigate to the **Date** tab of your **Date / Time** component.
2. In the **Minimum Date** field, input the desired date as the **earliest option** for your business users.
3. In the **Maximum Date** field, input the desired date as the **latest option** for your business users. Leaving any of above fields empty permits the user the select any date on the available calendar.

## Setting a relative date

To set a relative minimum or maximum date, you may use the JavaScript library Moment.js.

For example, to set the minimum date 10 days prior to the current date:

1. Check the **Use Input to add moment.js for minDate** box.
2. Input `moment().subtract(10,'days')` in the **Minimum Date** field.
3. To set the maximum date 10 days after the current date:
   1. Check the **Use Input to add moment.js for maxDate** box.
   2. Input `moment().add(10,'days') in the **Maximum Date** field.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-187546-be90bf3a.webp)
